Results 1 to 3 of 3

Thread: Centering a form inside MDI

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2001
    Posts
    8

    Centering a form inside MDI

    Hello all:

    Any ideas how to center a form that opens inside a MDI form I tried this
    me.left = (screen.width / 2) - (me.width / 2)
    me.top = (screen.height / 2) - (me.height / 2)
    but this seems to center it according to the screen.

    Thanks

    murubhai

  2. #2
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649
    The MDI form must be visible for this to work properly
    VB Code:
    1. Me.Move (MDIForm1.ScaleWidth - Me.Width) \ 2, (MDIForm1.ScaleHeight - Me.Height) \ 2
    Best regards

  3. #3

    Thread Starter
    New Member
    Join Date
    Aug 2001
    Posts
    8
    Thanks, it works

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