lunedì 4 marzo 2019

W10 - HIGH DPI SCALING FIX BLURRY APPS

On W10 due to high resolution screens, often the user set the screen scaling to better read the texts and icons, for example to 150%

After that, it happens that some app's text appears to be blurry, out of focus.

You can fix this in 3 places:
1. control panel, apply to the system
2. single app
3. registry

1- Using Control Panel, apply to the System
start menu, settings, system, display, here you have "Scale and layout " set for example to "150%",
click the link "Advanced Scaling Settings" and activate the option "Let Windows try to fix apps so they're not blurry"

2-single app
navigate to the executable file of the app (just as an example: c:\program file\blurryapp\blurry.exe" )
right click on the .exe file
"compatibility" tab
"change settings for all users" (if this is what you want)
"change high DPI settings"
select "Override high DPI scaling behavior." option
and then select "Application" in Scaling performed by

3. registry (this is useful for control panel apps , dll run by RUNDLL32.exe and similar)
When the blurry app does not have an executable (like the apps in the control panel for example) you can use the registry.
An example is Microsoft System Configuration Manager. It's window is blurry when scaling is activated.
Proceed like this:

regedit
create this key:

HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers]

then create a STRING value, where the name is the executable path and the value is "HIGHDPIAWARE"

in the RUNDLL32.exe case it's like this (you can copy and paste this into a .reg file, double click it to insert in the registry)

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers]
"C:\\Windows\\System32\\rundll32.exe"="HIGHDPIAWARE"

Once the setting is in the registry, simply close and reopen the app and it will be ok, no reboot is needed.

I used HKLM because is the simplest one, it applies to all user profiles of the machine, already existing and new one when they will be created