|
-
Sep 22nd, 2011, 05:15 AM
#1
Thread Starter
Fanatic Member
[RESOLVED] Child form position
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.
Paul Orton
VB6
Visual Web Developer 2008 Express Edition
Microsoft Visual Basic 2012 Express
-
Sep 22nd, 2011, 05:38 AM
#2
Re: Child form position
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.
-
Sep 22nd, 2011, 05:58 AM
#3
Thread Starter
Fanatic Member
Re: Child form position
Thank you - I just wondered if there might be an MDIform property that stopped child forms moving.
Paul Orton
VB6
Visual Web Developer 2008 Express Edition
Microsoft Visual Basic 2012 Express
-
Sep 22nd, 2011, 06:31 AM
#4
Thread Starter
Fanatic Member
Re: [RESOLVED] Child form position
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:
Code:
frmNewUser.MdiParent = Me
I don't, however, have a File or Window menu item on the MDIForm - could this be part of the problem?
Paul Orton
VB6
Visual Web Developer 2008 Express Edition
Microsoft Visual Basic 2012 Express
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|