resizable form window and controls

How can I make my VB.net form and all the objects within it resize to suit the window? I wish to switch from full screen to tiled with other apps without having to scroll to get to buttons. Controls could either scale up and down or compress/stretch. Can you set the minimum window size?
[288 byte] By [ozprog] at [2008-1-10]
# 1
It would be nice if you did a little investigation yourself first. All you had to do was look in the Properties window for a form and you would have seen the MaximumSize and MinimumSize properties. Also, you can set the BorderStyle of the window to one of the Fixed values so that the form can never be resized, even if the user tiles all windows. You can also remove the Maximise button in the Properties window if that's appropriate. If you do want to move/resize controls with the window you need to use their Anchor property. You can anchor them to any or all edges of the form, so their distance from that edge will be constant regardles of the form size.
jmcilhinney at 2007-10-3 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 2

I know this is an old question, but it is relevant to what I am looking for and I felt like commenting on it.

jmcilhinney wrote:
If you do want to move/resize controls with the window you need to use their Anchor property. You can anchor them to any or all edges of the form, so their distance from that edge will be constant regardles of the form size.
I sure don't see how that helps. It does not resize anything
SamHobbs at 2007-10-3 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 3

'jmcilhinney' how do you know this guy hasnt done any investigation into how this task is done?. I spent half a day looking into how this was done and overlooked it myself. Not a very friendly approach to a polite question.

1. Select the control on the form that you wish to resize.

2. Go to the anchor properties for that control in the soloution explorer.

3. Change the anchor points from 'Top, Left' (Default Value) to 'Top, Left, Bottom, Right'

The control will then resize itself perfectly to the size of the form. You can apply anchoring to as many controls as necessary but it does take a little trial and error.

appolospb at 2007-10-3 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 4

Hi appolospb

I am having trouble with the anchor property and liked your approach and wondered if you could help me too. I have also spent many hours investigating but seem unable to find the anchor property. I am trying to anchor and dock a simple button in a web page. (I am new to VS so this is probably very basic and I am overlooking something)

If I click on the control - in this case just a button and look in the property window, it is not there - neither are any docking properties.

If I follow your instructions above :

1. Select the button on the form -

2. Where in the solution explorer am I supposed to see the anchor properties ?

I see the following files : App_Data

Default.aspx

Default.aspx.vb

web.config

What is set / not set which is not allowing me to see the anchor properties ?

I am using VS 2005

Thanks Andrea

Andreaatmagnas at 2007-10-3 > top of Msdn Tech,Visual Basic,Visual Basic General...