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
 
 
 
 
 
 
 
TitleCenter the controls on a form
Keywordscenter controls
CategoriesControls
 
Place the controls in a PictureBox. At run time, cnter the PictureBox whenever the form is resized.

This example is maximized and the user cannot move or resize the form.

 
' At design time we set:
'     ControlBox = False
'     Caption = ""
'     WindowState = Maximized
'     BorderStyle = FixedSingle
Private Sub Form_Resize()
    picCenter.BorderStyle = vbBSNone
    picCenter.Move _
        (ScaleWidth - picCenter.Width) / 2, _
        (ScaleHeight - picCenter.Height) / 2
End Sub
 
 
Copyright © 1997-2001 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated