DPI设置更改为125%后,UI更改不正确 [英] UI changes improperly after DPI settings changed to 125%

查看:114
本文介绍了DPI设置更改为125%后,UI更改不正确的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

由于DPI设置的变化,我的应用程序遇到了一些问题。每当DPI设置更改为125%或更高时,不同UI控件的位置(标签) ,我的应用程序中的按钮,文本框,图像等)更改不正确。用户界面完全受到干扰。

客户要求是保持用户界面不变,无论DPI设置如何变化。



任何想法/建议如何解决这个问题。



注意:我尝试将AutoScaleMode设置为Font& DPI值,但似乎没有任何正常工作。我也尝试将值设置为None,这有点帮助但不完全。



任何形式的帮助都表示赞赏。

谢谢,

Dinesh



PS:该应用程序仅以.Net 2.0 Winforms编写。没有WPF或WCF

Hello all,
I am facing some problem with my application because of changes in DPI settings.Whenever the DPI settings are changed to 125% or more, the location of the different UI controls(labels, buttons, textboxes, images etc.) in my application changes improperly. The UI gets completely disturbed.
Client requirement is to keep the UI intact regardless of DPI settings changes.

Any ideas/suggestions how to fix this problem.

NOTE: I tried setting AutoScaleMode to Font & DPI values, but nothing seem to work properly. I also tried setting the value to None, this helped a little bit but not completely.

Any kind of help is appreciated.
Thanks,
Dinesh

PS: The application is written in .Net 2.0 Winforms only. No WPF or WCF

推荐答案

因为你问这个问题它告诉我你的应用程序是用Windows Forms编写的。你所说的很难在WinForms中完成,但并非不可能。



尝试阅读这个 [ ^ ],这个 [ ^ ]和这个 [< a href =http://stackoverflow.com/questions/185804/how-to-control-the-font-dpi-in-net-winforms-apptarget =_ blanktitle =New Window> ^ ]。



如果您在WPF中编写了应用程序,则无需执行任何操作即可获得相同的支持。 WPF自动缩放和调整。
Since you're asking this question it tells me that you're application is written in Windows Forms. What you're talking about is difficult to pull off in WinForms but not impossible.

Try reading this[^], this[^] and this[^].

If you wrote your app in WPF, you wouldn't have to do anything to get the same support. WPF scales and adjusts automatically.


这篇关于DPI设置更改为125%后,UI更改不正确的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆