如何正确处理高DPI? (WinApp VB.NET) [英] how to handle high DPI properly? (WinApp VB.NET)

查看:379
本文介绍了如何正确处理高DPI? (WinApp VB.NET)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我在高dpi设置下显示.NET Windows应用程序时遇到问题.

所有表单都设置为AutoScaleMode = DPI,但这不能解决所有问题.

基本上,标签最终会扩展以应付字体较大的问题,但是其他控件的位置不会改变,并且最终导致标签遮盖了其他控件或彼此之间.

屏幕应该看起来像这样:http://www.manageinvest.com/good.jpg ..并且在高DPI下,它最终看起来像这样:http://www.manageinvest.com/bad.jpg

有什么建议吗?

预先感谢,

Kristian

Hi All,

I have a problem with the display of our .NET Windows application under high dpi settings.

All forms are set to AutoScaleMode = DPI, but this does not solve all the problems.

Basically labels end up expanding in size to cope woth the font being bigger, but the location of other controls does not change and we end up with lables obscuring other controls or eachother.

The screen should look like this: http://www.manageinvest.com/good.jpg ..and on high DPI it ends up looking like this:http://www.manageinvest.com/bad.jpg

Any suggestions?

Thanks in advance,

Kristian

推荐答案

您是否考虑过使用FlowLayoutPanel,这样当标签调整其控件大小时,它将自动向下移动.
您可能需要对控件布局进行一些重新设计,但这会解决您的问题.
Have you considered using a FlowLayoutPanel, so that when a label resizes the controls under it will automatically move down.
You may have to do some rework on the control layout but it would fix your problem.


罗德,

谢谢您的回答.不幸的是,该应用程序包含大约100个复杂的屏幕,因此这可能不是一个可行的选择.

我很困惑为什么会在此应用程序上发生这种情况,因为我们有一个非常相似的应用程序,它具有一些相同的屏幕和所有相同的设置,并且不会受到此问题的困扰...

克里斯蒂安(Kristian)
Hi Rod,

Thank you for your answer. Unfortunately the application contains around 100 complex screens so this may not be a feasible option.

I am very puzzled as to why this is happening on this app, since we have a very similar app, with some of the same screens and all of the same settings, and that does not suffer from this issue...

Kristian


这篇关于如何正确处理高DPI? (WinApp VB.NET)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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