将清单文件添加到VB 2010 Express版的VB NET项目中吗?

时间:2019-03-04 17:31:23

标签: express visual-studio-2010 manifest scaling dpi

我的程序在运行时看起来有点模糊,因此我正在尝试实施以下解决方案:https://social.msdn.microsoft.com/Forums/vstudio/en-US/7b606ee7-5814-46a1-9b2d-959eccfa0c35/vbnet-blurry-application-during-runtime?forum=vbgeneral

但是,在我的VB 2010 Express版本中,没有用于添加清单的模板。

我已经在解决方案资源管理器中看到了一个app.manifest。 以前从未处理过app.manifest,这是否意味着我应该只编辑现有清单?

但是,如果这样,我不确定提议的行将去哪里?我现有的清单中没有类似的XML条目...

这显然是解决方案:

Add a new app manifest from the solution explorer using Add New Item.  Then go into the file generated and uncomment the section for high dpi.  It should look like:

  <application xmlns="urn:schemas-microsoft-com:asm.v3">
    <windowsSettings>
      <dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
    </windowsSettings>
  </application>
Then open the App.Config file and add this section under <configuration>:

  <appSettings>
    <add key="EnableWindowsFormsHighDpiAutoResizing" value="true" />
  </appSettings>
Note that you probably won't see the effect during debugging.  But when you run the compiled exe, it should look clear as if you had ticked the disable scaling on high dpi checkbox.

0 个答案:

没有答案