While using Windows 10, you must have seen there are certain applications, which are graphically appealing and have crisp and sharp images and fonts. And then, there are some applications, which are quite blunt and pale. The reason behind this difference in appearance is the problem with scaling. Not every apps are made to scale dynamically and automatically. The apps, which are made to scale automatically, will deliver crisper and sharper images and text. But, if they are not scaled dynamically, no matter how strong and advanced GUI you have, the app will still look dull and blunt.
The main concept here is DPI or Dots per inch. Dots per inch means, number of pixels in linear unit of physical space. The unit length is linear inch. In older displays, the DPI used to be around 96 dpi. Now, as time has progressed, high-definition displays have 300 dpi or even more. Older legacy desktop UI frameworks assumed that the DPI would remain the same always. But the scenario has changed completely. Now, DPI needs to change dynamically.
Let’s see some situations where DPI changes are evident:
1. When a high DPI laptop is docked or undocked to a low DPI external display.
2. When there is a multiple monitor setup, with different displays having different DPIs, if the application is moved from one display to another, then the DPI change will affect the overall experience.
3. Connecting a high DPI laptop or computer to a low DPI device via Remote Desktop. 4. Changing the display scale factor when applications are running.
DPI Awareness Modes
Desktop application on Windows 10, must tell you, if they support DPI scaling. This is called DPI awareness. There are various DPI awareness modes, such as, DPI Unaware, System DPI Awareness, Per-Monitor and Per-Monitor (V2) DPI Awareness, Check out the following DPI awareness modes.
DPI unaware applications operate at a fixed value of 96 DPI (100%). If you view these applications on a screen with a higher DPI, then Windows 10 will bitmap stretch the applications to the required physical size, thus making the application look dull and blunt.
System DPI Aware
Desktop applications that are system DPI aware typically receive the DPI of the primary connected monitor as of the time of user sign-in. During initialization, they lay out their UI appropriately (sizing controls, choosing font sizes, loading assets, etc.) using that System DPI value. As such, System DPI-aware applications are not DPI scaled (bitmap stretched) by Windows on displays rendering at that single DPI. When the application is moved to a display with a different scale factor, or if the display scale factor otherwise changes, Windows will bitmap scale the application’s windows, making them appear blurry. Effectively, System DPI-aware desktop applications only render crisply at a single display scale factor, becoming blurry whenever the DPI changes.
Per-Monitor and Per-Monitor (V2) DPI Awareness
It is recommended that desktop applications be updated to use per-monitor DPI awareness mode, allowing them to immediately render correctly whenever the DPI changes. When an application reports to Windows that it wants to run in this mode, Windows will not bitmap stretch the application when the DPI changes, instead sending WM_DPICHANGED to the application window. It is then the complete responsibility of the application to handle resizing itself for the new DPI. Most UI frameworks used by desktop applications (Windows common controls (comctl32), Windows Forms, Windows Presentation Framework, etc.) do not support automatic DPI scaling, requiring developers to resize and reposition the contents of their windows themselves.
There are two versions of Per-Monitor awareness that an application can register itself as: version 1 and version 2 (PMv2). Registering a process as running in PMv2 awareness mode results in:
- The application being notified when the DPI changes (both the top-level and child HWNDs)
- The application seeing the raw pixels of each display
- The application never being bitmap scaled by Windows
- Automatic non-client area (window caption, scroll bars, etc.) DPI scaling by Windows
- Win32 dialogs (from CreateDialog) automatically DPI scaled by Windows
- Theme-drawn bitmap assets in common controls (checkboxes, button backgrounds, etc.) being automatically rendered at the appropriate DPI scale factor
When running in Per-Monitor v2 Awareness mode, applications are notified when their DPI has changed. If an application does not resize itself for the new DPI, the application UI will appear too small or too large (depending on the difference in the previous and new DPI values).
Source of System DPI awareness and Per-monitor DPI awareness: Microsoft
Steps To Check DPI Awareness Modes In Task Manager On Windows 10
1. Open Windows Search option. Enter Task Manager as search entry, and open the application from the search result.
2. Now, as Task manager opens, go to Details tab.
3. Right click on any column and click on Select Columns.
4. The Select Column tab will open. Check the box beside DPI Awareness. Click OK.
5. The DPI Awareness column will appear.