Thursday, March 5, 2009

Setting child window location in MDI .NET

This problem occurs when you load a new child form inside the parent window while using MDI, but you are not able to set its location according to your requirement.

So there is some trick which i used.

say name of the child form is "form1"

form1.StartPosition = FormStartPosition.Manual;
form1.Location = new Point(50, 620);/* any arbitrary location*/
form1.Show();

Useful links
  1. http://www.daniweb.com/forums/thread43508.html
  2. http://bytes.com/groups/net-vb/354590-centerparent-not-working
  3. http://www.dotnet247.com/247reference/msgs/46/230816.aspx

Thanks,
Gaurav Nanda

No comments:

Post a Comment