Auto Resize of Form Controls

This is always my problem, each time i design form controls, each of them is not resizing whenever I maximize the form. I need to resize, panel layouts, datagridview, groupcontrol, tabcontrol, etc. Is there any easy way of scaling these controls that fits any resolution of display monitors. thanks in advance.
[310 byte] By [ChrisMoje] at [2007-12-25]
# 1

Hi Chris,

You can use the Anchor property of a control to have it resize when the form resizes. If your set this to Top, Bottom, Left, Right, the control will resize with the form. Either set this property is design time or use the following code at runtime:

Button1.Anchor = AnchorStyles.Bottom Or _

AnchorStyles.Left Or _

AnchorStyles.Top Or _

AnchorStyles.Right

For more information, see http://msdn2.microsoft.com/en-us/library/system.windows.forms.control.anchor.aspx

Hope this helps,

SvenDeBont at 2007-8-31 > top of Msdn Tech,Visual Studio Express Editions,Visual Basic 2005 Express Edition...