解决C#窗体项目在win10运行模糊的问题

在解决方案上右键——添加——新建项——选择“应用程序清单文件(仅限Windows)”项——添加。

打开刚刚新建的app.manifest,向下翻找到如下代码,取消代码注释。

  <!-- 指示该应用程序可以感知 DPI 且 Windows 在 DPI 较高时将不会对其进行
       自动缩放。Windows Presentation Foundation (WPF)应用程序自动感知 DPI,无需
       选择加入。选择加入此设置的 Windows 窗体应用程序(目标设定为 .NET Framework 4.6 )还应
       在其 app.config 中将 "EnableWindowsFormsHighDpiAutoResizing" 设置设置为 "true"。-->
  <!--
  <application xmlns="urn:schemas-microsoft-com:asm.v3">
    <windowsSettings>
      <dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
    </windowsSettings>
  </application>
  -->
posted @ 2020-10-01 22:45  星辰°  阅读(849)  评论(0编辑  收藏  举报