Setting MDI Child Form location programatically

  • Thread starter Thread starter Tom
  • Start date Start date
T

Tom

I want to be able to 'make' a MDI Child Window appear at the same place in
my MDI container. For example, maybe I want this Child window to always
appear at Top=0 and Left=0; or, when the user exits my Child window, I save
the last location for that window, and then when the reopen the window I
want to restore the location they were at previously.

In my Load event, I set the .Top and .Left properties for my child window;
however, when it shows in my MDI container it is always positioned
automatically (cascaded) and NOT positioned at the place I told it too. How
can I make it appear at the location I want it to within the MDI container?

Thanks.

Tom
 
when you open your child....
Dim f As New Form1

f.StartPosition = FormStartPosition.Manual 'here's the key

f.Left = 0

f.Top = 0

f.MdiParent = Me

f.Show()
 
Back
Top