By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,805 Members | 1,056 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,805 IT Pros & Developers. It's quick & easy.

Move controls when form maximized

P: n/a
Hi
This is propably easy to answer but how do I make sure that my controls
stay in a certain area of my form. Right now if I maximize my form the
controls will stay in their original position and the form will expand
all around it, how can I make my controls stay, say in the bottom right
corner no matter the size of the form and the resolution of the monitor?

Thanks

Jacob Thastrup

Nov 21 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Take a look at the Anchor property of the controls. This will allow you to
'anchor' your controls in a particular position on the form. If you set the
Anchor property to Top, your control will be anchored to the top of the form
no matter the size of the form. Similarly, if you set the property to Bottom
Or Left (since these are bit flags), the control will be anchored to the
bottom left of the form. Based on your requirements, a particular
combination of the flags should work for you.

hope that helps..
Imran.
"Jacob Thastrup" <ja***@thastrup.com> wrote in message
news:41***************@thastrup.com...
Hi
This is propably easy to answer but how do I make sure that my controls
stay in a certain area of my form. Right now if I maximize my form the
controls will stay in their original position and the form will expand
all around it, how can I make my controls stay, say in the bottom right
corner no matter the size of the form and the resolution of the monitor?

Thanks

Jacob Thastrup

Nov 21 '05 #2

P: n/a
Works like a charm

Thanks

Imran Koradia wrote:
Take a look at the Anchor property of the controls. This will allow you to
'anchor' your controls in a particular position on the form. If you set the
Anchor property to Top, your control will be anchored to the top of the form
no matter the size of the form. Similarly, if you set the property to Bottom
Or Left (since these are bit flags), the control will be anchored to the
bottom left of the form. Based on your requirements, a particular
combination of the flags should work for you.

hope that helps..
Imran.

"Jacob Thastrup" <ja***@thastrup.com> wrote in message
news:41***************@thastrup.com...
Hi
This is propably easy to answer but how do I make sure that my controls
stay in a certain area of my form. Right now if I maximize my form the
controls will stay in their original position and the form will expand
all around it, how can I make my controls stay, say in the bottom right
corner no matter the size of the form and the resolution of the monitor?

Thanks

Jacob Thastrup


Nov 21 '05 #3

P: n/a
"Jacob Thastrup" <ja***@thastrup.com> schrieb:
This is propably easy to answer but how do I make sure that my controls
stay in a certain area of my form. Right now if I maximize my form the
controls will stay in their original position and the form will expand
all around it, how can I make my controls stay, say in the bottom right
corner no matter the size of the form and the resolution of the monitor?


Take a look at the controls' 'Anchor' and 'Dock' properties, and the form's
'Scale' property. If you are looking for implementations of layout managers
like in Java, have a look here:

Simple Layout Managers
<URL:http://www.dotnet.jku.at/projects/slm/>

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 21 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.