Declaring Managed Applications As DPI-Aware
To declare your managed application as DPI-aware in Microsoft Visual Studio 2008, do the following:
In the Solution Explorer, right-click on your project (suppose your project is named DPIAware), point to Add, and then click New Item.
In the Add New Item – DPIAware dialog box, select Application Manifest File, and then click Add. The app.manifest file appears.
Copy and paste the following text into the app.manifest file and then save.
<?xml version="1.0" encoding="utf-8"?> <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" > <asmv3:application> <asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings"> <dpiAware>true</dpiAware> </asmv3:windowsSettings> </asmv3:application> </assembly>
In the Solution Explorer, right-click on the DPIAware project, and then click Properties to verify that the app.manifest is used.
Your application is now DPI-aware.
For information on how to make your Win32 applications DPI-aware, see Writing High-DPI Win32 Applications.
Build date: 10/27/2012