如何启用dpiAware?dpiAware

2023-09-02 02:02:51 作者:寡妇村村长

我怎样才能使dpiAware到这个现有的app.manifest:

 < XML版本=1.0编码=UTF-8&GT?;
    < asmv1:装配manifestVersion =1.0的xmlns =瓮:架构 - 微软COM:asm.v1的xmlns:asmv1 =瓮:架构 - 微软COM:asm.v1的xmlns:asmv2 =金塔:架构 - 微软-COM:asm.v2的xmlns:XSI =http://www.w3.org/2001/XMLSchema-instance>
      < assemblyIdentity版本=1.0.0.0NAME =MyApplication.app/>
      < trustInfo的xmlns =瓮:架构 - 微软COM:asm.v2>
        <安全>
          < requestedPrivileges的xmlns =瓮:架构 - 微软COM:asm.v3>
            <! -  UAC清单选项
                如果要更改Windows用户帐户控制水平更换
                requestedExecutionLevel节点以下步骤之一。


        < requestedExecutionLevel水平=asInvokeruiAccess =FALSE/>
        < requestedExecutionLevel水平=requireAdministratoruiAccess =FALSE/>
        < requestedExecutionLevel水平=highestAvailableuiAccess =FALSE/>

            指定requestedExecutionLevel节点将禁用文件和注册表虚拟化。
            如果你想利用文件和注册表虚拟化落后
            兼容性然后删除requestedExecutionLevel节点。
         - >
        < requestedExecutionLevel水平=asInvokeruiAccess =FALSE/>
      < / requestedPrivileges>
    < /安全>
  < / trustInfo>

  <兼容的xmlns =瓮:架构 - 微软COM:compatibility.v1>
    <应用>
      <  - !此应用程序的设计工作,所有的Windows版本的列表。 Windows会自动选择最适合的环境。 - >

      <! - 如果你的应用程序设计与Windows 7的工作,取消以下supportedOS节点 - >
      &所述;! - &所述; supportedOS标识={35138b9a-5d96-4fbd-8e2d-a2440225f93a}/&GT  - →;

    < /用途>
  < /兼容性>

  <! - 开启主题为Windows通用控件和对话框(Windows XP和之后) - >
  <! - <依赖>
    < dependentAssembly>
      < assemblyIdentity
          TYPE =win32的
          NAME =Microsoft.Windows.Common  - 控制
          版本=6.0.0.0
          的ProcessorArchitecture =*
          公钥=6595b64144ccf1df
          语言=*
        />
    < / dependentAssembly>
  < /依赖性和GT;  - >

< / asmv1:装配>
 

解决方案

根据宣布托管应用程序为DPI -Aware 你需要添加followng节里面的集结号的元素:

 < asmv3:应用程序的xmlns:asmv3 =瓮:架构 - 微软COM:asm.v3>
    < asmv3:windowsSettings的xmlns =htt​​p://schemas.microsoft.com/SMI/2005/WindowsSettings>
      < dpiAware>真< / dpiAware>
    < / asmv3:windowsSettings>
  < / asmv3:用途>
 

Mac怎么开启hidpi 黑苹果怎么开启hidpi

How can I enable dpiAware into this existing app.manifest:

  <?xml version="1.0" encoding="utf-8"?>
    <asmv1:assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
      <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
        <security>
          <requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
            <!-- UAC Manifest Options
                If you want to change the Windows User Account Control level replace the 
                requestedExecutionLevel node with one of the following.


        <requestedExecutionLevel  level="asInvoker" uiAccess="false" />
        <requestedExecutionLevel  level="requireAdministrator" uiAccess="false" />
        <requestedExecutionLevel  level="highestAvailable" uiAccess="false" />

            Specifying requestedExecutionLevel node will disable file and registry virtualization.
            If you want to utilize File and Registry Virtualization for backward 
            compatibility then delete the requestedExecutionLevel node.
        -->
        <requestedExecutionLevel level="asInvoker" uiAccess="false" />
      </requestedPrivileges>
    </security>
  </trustInfo>

  <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
    <application>
      <!-- A list of all Windows versions that this application is designed to work with. Windows will automatically select the most compatible environment.-->

      <!-- If your application is designed to work with Windows 7, uncomment the following supportedOS node-->
      <!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>-->

    </application>
  </compatibility>

  <!-- Enable themes for Windows common controls and dialogs (Windows XP and later) -->
  <!-- <dependency>
    <dependentAssembly>
      <assemblyIdentity
          type="win32"
          name="Microsoft.Windows.Common-Controls"
          version="6.0.0.0"
          processorArchitecture="*"
          publicKeyToken="6595b64144ccf1df"
          language="*"
        />
    </dependentAssembly>
  </dependency>-->

</asmv1:assembly>

解决方案

According to Declaring Managed Applications As DPI-Aware you need to add followng section inside "assembly" element:

<asmv3:application  xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" >
    <asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
      <dpiAware>true</dpiAware>
    </asmv3:windowsSettings>
  </asmv3:application>

相关推荐