【问题标题】:How to fix the blurry Form or UI of Visual Studio 2019 on C++ Project?如何修复 C++ 项目中 Visual Studio 2019 的表单或 UI 模糊?
【发布时间】:2021-04-02 05:57:31
【问题描述】:

在Visual Studio 2019上VB.Net的表单或UI模糊的问题,可以通过添加和配置项目的app.manifest.xml并在其中添加<dpiAware>true</dpiAware>来解决。

但是,我尝试在 Visual Studio 2019 中对我的 C++ 项目使用相同的方法,但没有可用的清单添加到项目中?

另外,将表单的AutoScaleMode 设置为Dpi 也不起作用。

你是怎么解决的?

【问题讨论】:

    标签: c++ visual-studio visual-studio-2019


    【解决方案1】:

    所以Visual Studio 2019上的C++ Project在设置UI的DPI Awareness时有不同的方法。

    为此,在Project 上的Right-Click 然后打开Properties > Manifest Tool > Input and Output > DPI Awareness 并选择选项High DPI Aware,单击应用和确定按钮然后运行项目和中提琴。

    【讨论】:

      【解决方案2】:

      您可以在Properties->Manifest Tool->Input and Output->Embed Manifest 中设置No 来生成清单文件。然后,您将在项目的Debug/Release 文件夹中找到它。打开它并添加以下代码。如果它已经存在并且被注释掉了,你可以取消注释它。

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

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2022-06-29
        • 2020-05-25
        • 2021-09-05
        • 2019-11-24
        相关资源
        最近更新 更多