Adjust GDI Scaling in Regedit for Legacy Apps
This guide explains how to adjust and enable high-DPI resolution scaling for legacy GDI (Graphics Device Interface) applications in Windows using the Registry Editor (Regedit). By configuring specific application compatibility flags in the Windows Registry, you can force legacy desktop programs to scale sharply and eliminate blurry interface elements on high-resolution displays.
Steps to Enable GDI Scaling via Regedit
1. Open the Registry Editor
- Press
Win + Rto open the Run dialog box. - Type
regeditand press Enter (or click OK). - Select Yes when prompted by User Account Control (UAC).
2. Navigate to the Compatibility Flags Key
In the address bar at the top of the Registry Editor, navigate to one of the following paths depending on whether you want to apply the fix to the current user or all users:
Current User only:
HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\LayersAll Users (System-wide):
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers
Note: If the Layers key does not exist under
AppCompatFlags, right-click AppCompatFlags,
select New > Key, and name it
Layers.
3. Create the Application Entry
- Right-click on an empty area inside the right pane of the
Layersfolder. - Select New > String Value.
- Name the new String Value with the full file path of your legacy
application executable (e.g.,
C:\Program Files (x86)\LegacySoftware\app.exe).
4. Set the GDI DPI Scaling Value
Double-click the newly created string value to edit it.
In the Value data field, enter:
~ GDIDPISCALINGClick OK to save the changes.
Tip: If you need to combine this with forcing the application to
run as DPI unaware before scaling, use
~ GDIDPISCALING DPIUNAWARE.
5. Verify the Changes
- Close the Registry Editor.
- Launch the legacy GDI application.
- Text and user interface components should now render natively at the target display’s DPI scaling factor rather than being stretched using standard bitmap scaling.
Reverting the Scaling Setting
To disable GDI scaling and restore default behavior, open the
Registry Editor, navigate back to the Layers key,
right-click the string value representing the application path, and
select Delete.