AutoScaleMode DPI 和 PrintDialog

发布于 2024-10-06 20:16:42 字数 220 浏览 0 评论 0原文

在启用我们的应用程序使用 AutoScaleMode = DPI 后,当我们以大于 96 的 DPI 显示 PrintDialog 时,我们会遇到一个奇怪的问题。在显示 PrintDialog 后,已显示的某些控件上的文本大小会增加到已经缩放的大小之上。在随后打开的表单上,控件会正确缩放,但字体会恢复到 96 DPI 的大小。

当然其他人一定也在使用这种组合,有谁知道会导致这种情况的原因以及是否有解决方案?

After enabling our aplication to use AutoScaleMode = DPI we are getting a strange issue when we show the PrintDialog at a DPI greater than 96. After the PrintDialog has been shown the text size on certain controls already showing is increased over the already scaled size. On forms that are opened after, the controls are scaled correctly but the font is back to the size it would be for 96 DPI.

Surely other people must be using this combination, does anyone know what would be causing this and if there is a solution?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

一个人的夜不怕黑 2024-10-13 20:16:42

看起来这个错误只存在于 Windows Vista 上,而在我们的 Windows 7 64 位计算机上这不是问题。

在 Vista 32 位上设置 oDialog.UseEXDialog = false; 似乎可以解决该问题;但在查看 Reflector 中的 PrintDialog 代码后,看起来这仅适用于 32 位版本,并且无法解决 64 位 Vista 机器上的问题。

看起来我们只会将 DPI 缩放支持限制为 Windows 7 或更高版本。

It looks like this bug is only present on Windows Vista as on our Windows 7 64 bit machines this is not an issue.

On Vista 32 bit setting oDialog.UseEXDialog = false; seems to solve the issue; but after looking at the PrintDialog code in reflector it looks like this would only work for the 32 bit version and would not solve the problem on a 64 bit Vista machine.

It looks like we will just limit support of DPI scaling to Windows 7 or newer.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文