Executable is not DPI aware, but scales GDI
ID PE143 Level INFO Category System
Description
The executable does not specify DPI awareness in the Application manifest. At the same time, executable requests GDI Window elements scaling from the operating system.
Newer Window-based applications should be PerMonitorV2
DPI aware. GDI scaling is a legacy option which only should be used as a temporary solution.
Mitigation
If using Visual C++:
- Create a separate Application manifest file if you have not done this for your application yet. This file will be used as an additional source to the default manifest generated by the Manifest tool.
- Add the external manifest file as an additional input file to the Manifest tool (also see the screenshot below).
- Add the
dpiAwareness
element to your Application manifest file and declarePerMonitorV2
DPI awareness. See the official Microsoft example.
If using Visual Studio with .NET Console, WinForms, WPF projects:
- Add the Application manifest file to your project. See the screenshot below.
- Add the
dpiAwareness
element to the Application manifest file in your project and declarePerMonitorV2
DPI awareness. See the official Microsoft example.
Note: in addition to the dpiAwareness
element, you can add the dpiAware
element to make your application compatible with earlier Windows versions.
Arguments
This rule has no output arguments.
Loading...
Unable to load this documentation page.