Click here to Skip to main content
15,885,980 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

I have a windows form with many different controls like textbox,lable,button,grid etc etc, I have design this form on my system resolution, 1366x768 , now when i take this Windows Form Application to another computer which have resolution like 1360x768 OR 1280x768 OR 1280x720 OR 1024x768 OR 800x600 or any resolution on System etc etc , form just got mess up.

I want that all controls and Form itself adjust its Height, width, Location according to resolution.

Is there any Solution For This Please Help Me......
Posted
Comments
PhilLenoir 22-Aug-14 8:53am    
Have you considered using WPF?

1 solution

I design my apps assuming a resolution of 800 x 600 because growing or stretching controls is easy. I have no idea how to shrink them. Basically you should look at the anchor property[^] of each control. If you tell it to anchor to the Top Left...it will always stay the same size and on the top left. But if you tell it to anchor to the Top Left Right, it will stretch to the right when the form is re-sized. The best way to get a handle on how it works is to play with it a bit. You also may be interested in the dock property[^].

Hope this helps.
 
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