+1  A: 

I tried showing the child with the MDI container form as owner, but caused an exception for me. You could manually set the location before showing the child as follows:

Form2 f = new Form2();
f.MdiParent = this;
f.StartPosition = FormStartPosition.Manual;
f.Location = new Point((this.ClientSize.Width - f.Width) / 2,
                       (this.ClientSize.Height - f.Height) / 2);
f.Show();

EDIT:

f.StartPosition = FormStartPosition.CenterScreen;

is the correct way to center an mdichild on its parent form.

Patrick McDonald
This method has good logic. But this will work with respect to the screen and not the parent container. So it will look bit ackward if the parent and child windows are minimized.
Srikanth V M
Is there any chance by which we can make the child layout become center of the mdi parent. I think the property of FormStartPosition.CenterParent is dummy if it cannot make the child in the center of the parent.
Srikanth V M
+2  A: 

I experimented a bit with this, and first came to the same solution as Patrick. But I was bugged by the following statement in the documentation of the StartPosition property:

You can also position the form to display in the center of the screen or in the center of its parent form for forms such as multiple-document interface (MDI) child forms.

So, I decided that there must be a way. And there is, though I don't find it all intuitive: set the StartPosition to CenterScreen (not CenterParent):

MdiChildUI form = new MdiChildUI();
form.MdiParent = this;
form.StartPosition = FormStartPosition.CenterScreen;
form.Show();

Of course, you can also set it in the designer instead of in code.

Fredrik Mörk
+1, CenterScreen is the correct method for centering an mdichild in its parent form
Patrick McDonald
Is there any chance by which we can make the child layout become center of the mdi parent. I think the property of FormStartPosition.CenterParent is dummy if it cannot make the child in the center of the parent.
Srikanth V M
@Srikanth: read my answer again; the provided code will show the mdi child centered in the mdi parent.
Fredrik Mörk
+1  A: 

Setting start position as center screen works perfect for me.

danish