Click here to Skip to main content
15,879,535 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
See more:
hi to all ,
I am working on a project c# .net where i need to make my application dialog boxes resolution free ..
I mean to say that if i make changes in resolution of the windows operating system then it should not have any effect on the dialog boxes of my application .
Thanks in advance
Posted
Updated 28-Jul-11 1:01am
v2
Comments
Wayne Gaylard 28-Jul-11 6:58am    
What does that mean exactly?
iampradeepsharma 28-Jul-11 7:00am    
i mean if i change the resolution the windows operating system then it should not have any effect on the dilog box .
lukeer 28-Jul-11 7:44am    
That's plain impossible. A change in resolution will affect an application's depiction in some way. Always.

You can, however, make some aspects resolution-independent at the expense that some others will have to change in order to compensate.

You can make your application window a fixed size in pixels. At a larger resolution, it will maintain its size in pixels. All controlls will still have their sizes and distances to each other. But the monitor space not covered by your application will get larger.

You can make your application window fullscreen. At a larger resolution, it will remain fullscreen, still totally covering the monitor. But empty space, filled with window background colour could show up along the right and bottom edges.

You can make your application fullscreen and its controls cover all the client space. At a larger resolution the controls will have to grow to keep occupying all available space.

So you need to specify which version you would prefer your application to behave.
Olivier Levrey 28-Jul-11 8:17am    
Isn't WPF resolution independant? I've never used them so far but I read something like that...
Debojyoti Majumder 28-Jul-11 7:15am    
I am intersted in knowing purpose of the problem??

Uses the default... Let your form be scaled with the system font size. This is generally the best option as people that have a small screen but high resolution will typically use large fonts (125% or even 150%).

You can also scale according to "reel" size although it might not be exact as monitor might typically report DPI a bit smaller than reality in part to compensate the fact that screen lisibility is not as good as paper.

Also, the information might not always be known exactly. I would think that recent monitors would report the pixel density but it was not always the case.
 
Share this answer
 
The core issue is, you need to use the dock and/or anchor properties on control on your form, so they space themselves according to the size of the form. Phillipe is right, the user has set their desired font size, don't you mess with it.
 
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