In the display settings of Windows 10, you can set the scaling ratio (for example: 125%, 150%). Please note that it is not the DPI value. How to get this value using C#.
In the display settings of Windows 10, you can set the scaling ratio (for example: 125%, 150%). Please note that it is not the DPI value. How to get this value using C#.
Have you got any chance to check the previous comment: https://docs.microsoft.com/en-us/answers/questions/402933/?
For example with GetDpiForWindow
with a Manifest to get right results:
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/PM</dpiAware>
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitor</dpiAwareness>
</windowsSettings>
</application>
I get :
96 for 100%
120 for 125%
144 for 150%
etc...
18 people are following this question.