Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

controls don't move on maximize

Status
Not open for further replies.

hinchdog

Programmer
Feb 14, 2001
380
US
i have three command buttons sitting on the bottom of a form. when the form is maximized, the form fills the screen but the buttons stay in the same position instead of realigning to the bottom of the screen. how do i keep the controls in the same position relative to the form? thanks

-frank
 
hi frank,
the trick to make the controls on the form move is to fix their position on the form in a relative manner and not absolutely. this is to say that on form load event set the left and top properties of the controls relative to the length or width of the form and after doing this on Form_Resize event again set the left and top properties of the controls so that their position on the form is relative to the size of the form. By doing this, evey time the size of the form is changed, the position of the controls is calculated relatively.
I hope this should solve your problem.

regards
sachin

ps you can get back to me for further details.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top