Windows Display Setting at 150% still shows 96 DPI

Matt picture Matt · Aug 9, 2011 · Viewed 8.1k times · Source

On my laptop running Win7, when I set the display setting to 125%, the DPI shows up as 120 (using both graphics.DpiX and GetDeviceCaps) as expected. However, with the display at 150%, the DPI is 96 (?!), just like it is at 100%. Does anyone know a) why this is the case and b) is there any other way other than checking the DPI to detect if the display is set to anything other than 100%? I'm writing an app that I want to display a message when the display is set to >= 150%.

Thanks.

Answer

Arjailer picture Arjailer · Aug 10, 2011

On Windows Vista and Windows 7, with DPIs above 120 (I think) and applications that it considers to be non-DPI aware, they switch into DPI Virtualization Mode.

This does exactly what you're seeing - the application thinks it's running in 96dpi while Windows blows it up and renders everything bigger (and blurrier).

For more details: https://docs.microsoft.com/en-gb/windows/win32/hidpi

(original link (now redirects to above): http://msdn.microsoft.com/en-us/library/dd464660(VS.85).aspx#dpi_virtualization)

The article explains how to disable it on a per-application basis.