Results 1 to 3 of 3

Thread: MDI Child Centering..

  1. #1

    Thread Starter
    Hyperactive Member nickwrs's Avatar
    Join Date
    Jan 2000
    Location
    Atlanta, Ga
    Posts
    398

    Exclamation

    Is there a good way to place MDI child forms when the window is maximized???


    I am having trouble getting them to move!!


    :-(

    Please help.


    Nick

  2. #2
    PowerPoster 2.0 Negative0's Avatar
    Join Date
    Jun 2000
    Location
    Southeastern MI
    Posts
    4,367
    Try this:

    Code:
    Public Sub Center_Form(CallingForm As Form)
      CallingForm.Left = (MDIMainMenu.Width - CallingForm.Width) / 2
      CallingForm.Top = (MDIMainMenu.Height - CallingForm.Height) / 2
    End Sub
    
    Sub Form_Load()
      Call Center_Form(ME)
    End Sub

  3. #3
    Guest
    Try this.

    Code:
    Private Sub MDIForm_Load()
    
        Form1.Move (Me.ScaleWidth / 2) - (Form1.Width / 2), (Me.ScaleHeight / 2) - (Form1.Height / 2)
        
    End Sub

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