Tuesday, January 25, 2011

DPI settings in Windows form in c#.net

If you are a windows form developer then you need to look at a lot of issues regarding the designing of the windows forms. Microsoft has handled these properties very carefully and also provides the required properties in the windows form properties. If you wiil change the system properties by (Right click on desktop->Properties Display Properties dialog will Open) then Settings->Advanced-> Then Change DPI settings to a different options (like Normal Size (96 dpi)/Large Size 120 dpi) then you display setting will change accordingly. So if you are making any Windows application then You need to set the Windows form properties accordingly. For this you need to:
Go to Windows form Properties then Select AllowScaleMode to DpiAutoSize=true. Then the form will behave accordingly.But remember if you are hardcode any thing like width and Height then it will not affect.
Hope this will work.
and

No comments:

Post a Comment