Click here to Skip to main content
15,886,362 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have written the winform app in c#, and now i am testing it on many systems. I have a problem showing the form on different screen resolutions. How to make the app to be shown in full on all the resolutions?
What is the right way to solve this?
Posted
Comments
Ravi Bhavnani 5-Apr-13 17:53pm    
It depends what you mean by "shown in full". If you mean maximized, simply do:

this.WindowState = FormWindowState.Maximized;

/ravi
Philippe Mori 5-Apr-13 20:47pm    
It depends a lot on the application but typically you would maximize it and have a layout that adjust itself (using anchors and/or docking). Typically, you want you application to scale according with global font which is the default).
Member 4347041 6-Apr-13 1:41am    
Size of my form is 1370; 710, there is lot of textboxes,... i did try to minimize spaces between them. All the textboxes, lables,... must be shown on a form. Is there a way to let say scale all the texboxes, labels,... according to screen resolution? For example if resolution is 800x600, the whole form, textboxes, lables, buttons,... are scaled with 0.5.
Member 4347041 21-Apr-13 8:13am    
With this code: <pre lang="c#">this.Size = new Size(820, 710);</pre> and <pre lang="c#">this.Size = new Size(1370, 710);</pre> i am changing the with of a form. Works great on a few screen resolutions but not for all of them. Isn't the pixel the same no matter what screen resolution is selected?

1 solution

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