Visual Basic Code , VB.NET Code, VB Code
  Home   :  Code   :  Forums   :  Submit   :  Mailing List   :  About   :  Contact


Need a code to center a form


Need a code to center a form

Author
Message
annu_itech
annu_itech
Forum God
Forum God (993 reputation)Forum God (993 reputation)Forum God (993 reputation)Forum God (993 reputation)Forum God (993 reputation)Forum God (993 reputation)Forum God (993 reputation)Forum God (993 reputation)Forum God (993 reputation)

Group: Forum Members
Posts: 19, Visits: 155
having an mdi form...and when i load a child form into it...it gets loaded in any position..

so..need a code to center the child forms when it gets loaded..or show method of that form is called

the resolutions is 1024 by 768.

can any one help me to find it out.

vshankaa
vshankaa
Forum God
Forum God (21K reputation)Forum God (21K reputation)Forum God (21K reputation)Forum God (21K reputation)Forum God (21K reputation)Forum God (21K reputation)Forum God (21K reputation)Forum God (21K reputation)Forum God (21K reputation)

Group: Forum Members
Posts: 276, Visits: 215
When child form loads put the below code...

Private Sub frmChild_Load()
frmChild.Left = (Screen.Width / 2) - (frmChild.Width / 2)
frmChild.Top = (Screen.Height / 2) - (frmChild.Height / 2)
End Sub



___________________________________
You can see my projects in my homepage!

GO


Similar Topics


Reading This Topic


Login
Existing Account
Email Address:


Password:


Social Logins

Select a Forum....

















A1VBCode Forums


Search