简体   繁体   English

在某些计算机上放大了表格

[英]Form is zoomed in on some computers

Some people that use my program have a like zoomed in form. 使用我的程序的某些人具有类似的放大形式。 Has this anything todo with the .NET version they have or what's the problem. 这与他们拥有的.NET版本有什么关系吗,或者是什么问题。 They don't have the same screen resolution. 它们的屏幕分辨率不同。

在此处输入图片说明

让用户将其浏览器缩放到100%可能大于100%,因此可能是问题的原因。

This definitely seems like a result of DPI awareness (available since Windows Vista). 这肯定是DPI意识的结果(自Windows Vista开始可用)。

The right thing to do is to make your app "fluid" and properly format itself for bigger content. 正确的做法是使您的应用程序“流畅”并正确格式化自身以获取更大的内容。

The easy way out is to disable DPI awareness. 最简单的方法是禁用DPI感知。 Your app will still be bigger, but it will be scaled as a whole instead of having every independent component scale by itself. 您的应用程序仍然会更大,但是会整体缩放,而不是让每个独立组件单独缩放。

You can do so by adding the following in your app.manifest file: 为此,您可以在app.manifest文件中添加以下内容:

<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" >
 ...
  <asmv3:application>
    <asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
      <dpiAware>false</dpiAware>
    </asmv3:windowsSettings>
  </asmv3:application>
 ...
</assembly>

The version of .NET should make no difference. .NET的版本应该没有任何区别。 The version of windows probably does, and also things like settings for high DPI screens, as blogged by Scott Hanselman 可能是Windows的版本,还有像Scott Hanselman所写的高DPI屏幕设置之类的东西

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM