Show a child form in the centre of Parent form in C#

Try:

loginForm.StartPosition = FormStartPosition.CenterParent;
loginForm.ShowDialog(this);

Of course the child for will now be a blocking form (dialog) of the parent window, if that isn’t desired then just replace ShowDialog with Show..

loginForm.Show(this);

You will still need to specify the StartPosition though.

Leave a Comment