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

How can i set center screen windows form resolution according to system resolution in c# .net windows application?

My application had develop 1680 by 1050 resolution, but now i running 1280 by 800 resolution so my application its now showing properly.

Bottom end has been not showing in 1280 by 800 resolution.

Please help me how will be set resolution according to any system resolution.
My Application it should be shown center screen on any system properly.

Please help me.

Thanks in Advance.

Ankit Agarwal
Software Engineer
Posted
Comments
Mayur Panchal 17-May-13 7:47am    
Can't you start maximized?

Set the System.Windows.Forms.Form.WindowState property to FormWindowState.Maximized

The application forms have no resolution. The form takes a portion of the screen. It would be a mess if resizing a form would change the scale of the controls. So what you need do do is to think in layout and not in position of the controls. WPF is giving you better tools, but in windows forms you have some impossibilities:
Docking[^], autsizing[^] and anchors[^]
Flow layout[^] and Table layout[^]
But of course you can set window position[^] to, automatically[^] if you need.
 
Share this answer
 
v2
use contaners like table layout panel , simple panels etc. put controls inside as per requirement
learn dock, Anchor properties of cntrols

Happy Coding!
:)
 
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