Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
 
 
 
 
 
 
 
Old Pages
 
Old Index
Site Map
What's New
 
Books
How To
Tips & Tricks
Tutorials
Stories
Performance
Essays
Links
Q & A
New in VB6
Free Stuff
Pictures
 
 
 
TitleFill the screen with a form and center the controls it contains
Keywordsfull screen form, center controls
CategoriesControls
 
At design time set:

  • ControlBox = False
  • Caption = ""
  • WindowState = Maximized
  • BorderStyle = None

Put the controls inside a PictureBox. When the form first resizes, center the PictureBox.

 
Private Sub Form_Resize()
    picCenter.BorderStyle = vbBSNone
    picCenter.Move _
        (ScaleWidth - picCenter.Width) / 2, _
        (ScaleHeight - picCenter.Height) / 2
End Sub
 
 
Copyright © 1997-2003 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated