winform5、高清屏下字体模糊的解决方法

winform5、高清屏下字体模糊的解决方法

具体步骤:

1、选择当前项目,单击鼠标右键,选择【添加】|【类】;

2、选择【应用程序清单文件】;

image-20211121220455356

3、打开刚才建立的清单文件,添加下面的代码

4、保存运行,发现修复了界面模糊问题。

如果app.manifest 应用程序清单文件存在下面代码, 就把下面代码的注释去掉。

注意:不同windows,下面的代码不一定有两行设置

image-20211121220301081

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

image-20211121220543002

猜你喜欢

转载自blog.csdn.net/qq_38463737/article/details/121504045