Dpi Mode Enum
Specifies the different high DPI modes that can be applied to an application.
public enum class HighDpiMode
public enum HighDpiMode
type HighDpiMode =
Public Enum HighDpiMode
The application window does not scale for DPI changes and always assumes a scale factor of 100%.
Similar to DpiUnaware, but improves the quality of GDI/GDI+ based content.
The window checks for DPI when it's created and adjusts scale factor when the DPI changes.
Similar to PerMonitor, but enables child window DPI change notification, improved scaling of comctl32 controls, and dialog scaling.
The window queries for the DPI of the primary monitor once and uses this for the application on all monitors.
Specifying the high DPI mode is dependent on the OS version of the machine you're running your application on. Setting the high DPI mode will work on machines running Windows 10 Creators Update (version 1703) or later versions.
Changing the DPI mode after the application has started running doesn't impact scaling (that is, the change won't take effect).
If you're using the
PerMonitor value and there is more than one monitor attached with different DPI settings, the DPI may change when the window is moved from one monitor to the other.
In this case, the application rescales according to the new monitor's DPI settings.
Alternatively, the DPI of a window can be changed when the OS scaling setting is changed for the monitor the window is on.