Using an external manifest to turn off Windows DPI scaling

会有一股神秘感。 提交于 2019-12-25 03:29:15

问题


I have a Java application on Windows that's launched through a packr exe. I need to turn off DPI scaling by default. I don't have control of the exe's generation.

My understanding is that I can do this by adding an external .manifest file, but it doesn't seem to work.

This is the manifest file, which I put at "Airships.exe.manifest" next to "Airships.exe".

<?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="Airships.exe"/>
  <asmv3:application xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
    <asmv3:windowsSettings
xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
      <dpiAware>True/PM</dpiAware>
    </asmv3:windowsSettings>
  </asmv3:application>
</asmv1:assembly>
  • Is there something incorrect about this manifest?
  • Does an external manifest actually work by default, or do I have to embed it into the .exe somehow?

NB this related question doesn't actually have an answer.

来源:https://stackoverflow.com/questions/50188256/using-an-external-manifest-to-turn-off-windows-dpi-scaling

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!