I want to read out the value of the "Display"-Setting out of the "Appearance and personalization" in the controlpanel of Windows7 with a C#-App , because prior Startup the app has to check that the value is set in 100% and inform the user if this is not the case.
Here is what control panel I mean: http://maketecheasier.com/change-icon-size-and-display-settings-in-windows-7/2010/01/12
Thank you in advance!
I tried:
(Code-Example from How to get Windows Display settings? did not work, its always 96)
SystemInformation.IconSize (?)
Maybe it is a value of the system metrics - what what value? (http://pinvoke.net/default.aspx/Enums.SystemMetric)
You are after the two "dpi" settings in Windows, one in the horizontal direction, and one in the vertical direction. It is very common that
dpiXanddpiYwill be the same:Note: Most programs are poorly written, and do not handle high-dpi display settings properly. Because of this, starting with Windows Vista, Microsoft lies to any application that does not specifically declare that it correctly supports high-dpi displays. Applications are told that the display is still set to the (legacy default) 96dpi. Windows then uses the video card to resize your application to make it larger:
You opt out of high-dpi scaling by adding an entry to your application's
manifest: