Click here to Skip to main content
15,887,585 members
Please Sign up or sign in to vote.
4.33/5 (2 votes)
See more:
What's the best practice for C# Forms for the above? Thanks.

Posted

I had this problem and I don't know if I took the best approach but I used flowlayoutpanels a lot using percentages and always maximized my form.

probably not the best approach but it worked, you can get max size using System.Windows.Forms.SystemInformation.PrimaryMonitorSize property
 
Share this answer
 
You can use AutoScaleMode property

 
Share this answer
 
Before .NET I solved this problem "by hand". I arranged the controls to look ok at the lowest acceptable resolution. Then for higher resolutions I had extra space in the X and Y directions.

I allowed selected controls to "grow" by a percentage of this extra space. For example, my button controls ignored extra space, but a list box would use it to show more of its information to the user.

I also defined rows and columns of controls that would keep the same space between them even when one or more of those controls grew.

With docking and anchoring you can often come up with a simpler solution in .NET.
 
Share this answer
 


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