How to get Windows 10 display scaling value using C# (Note: not the DPI value)

Steven Young 261 Reputation points

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#.

Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,863 questions
Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
10,937 questions
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,479 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Castorix31 82,321 Reputation points

    For example with GetDpiForWindow

    with a Manifest to get right results:

       <application xmlns="urn:schemas-microsoft-com:asm.v3">  
           <dpiAware xmlns="">true/PM</dpiAware>  
           <dpiAwareness xmlns="">PerMonitor</dpiAwareness>  

    I get :
    96 for 100%
    120 for 125%
    144 for 150%

    1 person found this answer helpful.
    0 comments No comments