VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Simple code to resize and center a form.

by Edgardo Santiago (1 Submission)
Category: Custom Controls/Forms/Menus
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sun 7th April 2002
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Simple code to resize and center a form.

Rate Simple code to resize and center a form.



On Error Resume next
'This is what you need
'Select the Picture Control and Put it on the Form
'Set the Property Align to Bottom
'Set the BorderStyle to None
'Know depending the Size of the Form at the Beginning
'When you Click the Maximize Button this will put the Form maximze Right
'Type or Paste this Code to Resize your Form
me.width = Picture1.width
'This Code will resize your Form Only the Top and Bottom
'The Side Left and Right will remain the Same Size
' of the Form When 'youMiximize it
'If you Will like to Keep it In the Middle of the Screen
'Type this Code Bellow
Me.left = ((Screen.width - Me.width)/2)
Me.top = ((Screen.height - Me.Height)/2)
'This Will Keep the Form in the Center of the Screen
'Any Question E-Mail Me at [email protected]
 

Download this snippet    Add to My Saved Code

Simple code to resize and center a form. Comments

No comments have been posted about Simple code to resize and center a form.. Why not be the first to post a comment about Simple code to resize and center a form..

Post your comment

Subject:
Message:
0/1000 characters