Click here to Skip to main content
15,897,187 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to resizing All Controls with main form as per sreen resolution at runtime
.
Posted
Updated 25-Aug-12 1:41am
v2

You just set the properties of the control in the designer, I think stretch and dock are their names, so that they act the way you want them to when you resize the form.
 
Share this answer
 
hi fried,

use dock property.

design time:
right click on the Control->properties->Dock->yourOption(right,fill,left,bottom).

code window: for example button control

C#
button1.Dock = DockStyle.Fill;
            button1.Dock = DockStyle.Bottom;
            button1.Dock = DockStyle.Left;
            button1.Dock = DockStyle.None;
            button1.Dock = DockStyle.Right;
            button1.Dock = DockStyle.Top;

regards
sarva
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900