iA piece of internet history. AllAPI.net was made by two Belgian brothers, still in their teens, from 1998 to 2002, and at its peak 180,000 programmers a month came here. We keep it online exactly as it was. Nothing here is maintained anymore.
AllAPI Network - The KPD-Team

 
Allapi Network
 API-Guide
 ApiViewer

 API List

 
API Resources
 Tips & Tricks
 VB Tutorials
 
Misc Stuff
 VB examples
 VB Tools
 VB Links
 Top Downloads
 


How do I center a form?

If you are using VB4, the form does not have a StartUpPosition property.  However, there is an easy way to center the form at startup.  Simply copy the code below into a module in your project. You can then center every form by calling CenterForm(me) in the load event of all forms.

Public Sub CenterForm(frm As Form)
    frm.Top = (Screen.Height - frm.Height) / 2
    frm.Left = (Screen.Width - frm.Width) / 2
End Sub

 

 


Copyright © 1998-2007, The Mentalis.org Team - Privacy statement
This site is located at http://allapi.mentalis.org/