-
December 11th, 2004, 11:43 AM
#1
centering controls in form
hello guys
i have a problem
i have created one of my programs which is consisting of form , small form which has controls and buttons now if i maximuzie the form the buttons and contros will appear i the lift side of the form, my quation is how can i make the controls and buttons appear in the middle of the form when i maximize the form ??
thanks
-
December 11th, 2004, 03:52 PM
#2
Re: centering controls in form
Please remember to rate the posts and threads that you find useful.
How can something be both new and improved at the same time?
-
December 12th, 2004, 10:47 AM
#3
Re: centering controls in form
thank you wizbang this exacally what i want but..
what i need some thing more i need my program to do the same but with out resizing the buttons, the buttons should stay the same but put them in the center
thanks again
-
December 12th, 2004, 03:04 PM
#4
Re: centering controls in form
To center a control horizontally, you can do this:
Code:
Private Sub Form_Resize()
Command1.Left = Me.Width \ 2 - Command1.Width \ 2
End Sub
Please remember to rate the posts and threads that you find useful.
How can something be both new and improved at the same time?
-
December 12th, 2004, 06:27 PM
#5
Re: centering controls in form
wizbang
i have problem with the last code
the program that i have created is a calculator so when i write that code all of the buttons align in the same position, so what is the solution for that
thanks
-
December 12th, 2004, 06:44 PM
#6
Re: centering controls in form
An easy way would be to put the buttons in a frame, and just move that. You can set the BorderStyle to None if you don't want it to be seen.
Please remember to rate the posts and threads that you find useful.
How can something be both new and improved at the same time?
-
December 13th, 2004, 01:09 AM
#7
Re: centering controls in form
wizbang it is a good idea
but how can i move the buttons along with the frame , or how can i attach the buttons to the frame so they will move along
thanks
-
December 13th, 2004, 02:33 AM
#8
Re: centering controls in form
You can select all the buttons that you want to put in the frame, and select Cut from the Edit menu. Then select the frame, and Paste them in.
Please remember to rate the posts and threads that you find useful.
How can something be both new and improved at the same time?
-
December 13th, 2004, 12:53 PM
#9
Re: centering controls in form
wizbang thank you very much for helping
it worked fine
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|