How to activate “disable display scaling on high dpi settings” programatically [duplicate]

。_饼干妹妹 提交于 2019-12-04 09:11:14

Using manifest file (app.manifest under Visual C# project) resolved this issue for me. For example:

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

Of course this should be inside your main "assembly" section.

P.S. I verified this when debugging GitExtensions.

P.P.S. I understand that the question is old, but may be someone still needs the info.

Update: however it may lead to automatical undesired resizing of components on the windows form.

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