Results 1 to 2 of 2

Thread: StartUp Position

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jul 1999
    Posts
    19
    Hi,

    HOw do I program to start my form at centre screen upon startup, without setting from the properties window.
    I tried the following, but failed to do so.
    frmMyForm.StartUpPosition = 2
    as well as this,
    frmMyForm.StartUpPosition = vbStartUpScreen

    Please advice...thanks

  2. #2
    Conquistador
    Join Date
    Dec 1999
    Location
    Australia
    Posts
    4,527
    here you go man:
    Code:
    Private Sub Form_Load()
    Me.Left = (Screen.Width - Me.Width) / 2
    Me.Top = (Screen.Height - Me.Height) / 2
    End Sub
    this centres your form

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