0 out of 3 rated this helpful - Rate this topic

Declaring Managed Applications As DPI-Aware

To declare your managed application as DPI-aware in Microsoft Visual Studio 2008, do the following:

  1. In the Solution Explorer, right-click on your project (suppose your project is named DPIAware), point to Add, and then click New Item.

  2. In the Add New Item – DPIAware dialog box, select Application Manifest File, and then click Add. The app.manifest file appears.

    Screen shot showing the Add New Item dialog box.

  3. 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>
    		
    
  4. In the Solution Explorer, right-click on the DPIAware project, and then click Properties to verify that the app.manifest is used.

    Screen shot showing the Application settings.

  5. Your application is now DPI-aware.

For information on how to make your Win32 applications DPI-aware, see Writing High-DPI Win32 Applications.

 

 

Send comments about this topic to Microsoft

Build date: 10/27/2012

Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.