How do I prevent a child form from moving down and across each time it is opened?
I want it to always open in the extreme top left.
Printable View
How do I prevent a child form from moving down and across each time it is opened?
I want it to always open in the extreme top left.
The form position, is relevant to its parent. Just as you would set the Top/Left or Location of a control, you can do the same for a Form. Just change it in your Form.Load event.
Thank you - I just wondered if there might be an MDIform property that stopped child forms moving.
Hmm, this isn't resolved after all...
Setting Left and Top to 0 sends the child forms to 0,0 on the entire screen and not to 0,0 on the space below the MDIForm's menustrip. Some of them can then be dragged anywhere on the screen - they don't stay below the menustrip. Some of them *do*, however, remain confined to where they should be.
The MDIForm (frmMain) has IsMDIContainer set to True and WindowState to Maximised.
Each child form is 'declared' in frmMain.Load like this:
I don't, however, have a File or Window menu item on the MDIForm - could this be part of the problem?Code:frmNewUser.MdiParent = Me