Results 1 to 4 of 4

Thread: [RESOLVED] Child form position

  1. #1

    Thread Starter
    Fanatic Member paulorton's Avatar
    Join Date
    Aug 2006
    Location
    West Wales
    Posts
    809

    Resolved [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

  2. #2
    PowerPoster
    Join Date
    Mar 2002
    Location
    UK
    Posts
    4,780

    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.

  3. #3

    Thread Starter
    Fanatic Member paulorton's Avatar
    Join Date
    Aug 2006
    Location
    West Wales
    Posts
    809

    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

  4. #4

    Thread Starter
    Fanatic Member paulorton's Avatar
    Join Date
    Aug 2006
    Location
    West Wales
    Posts
    809

    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
  •  



Click Here to Expand Forum to Full Width