在桌面应用程序中具有图形兼容性 [英] Having Graphical Compatibility in a Desktop Application

查看:88
本文介绍了在桌面应用程序中具有图形兼容性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以使用什么功能来使我的应用程序在不同分辨率的屏幕上自动获得正确的尺寸.

现在,当我在PC(1024 X 768)上运行它时,它可以正常运行,但是当它以更高的分辨率运行时,对象将变得混乱.

任何解决方案或引用????

What feature can i use to get my application get the correct size on different resolution screens automatically.

Right now when i run it on my PC (1024 X 768) it runs fine but when it goes on a higher resolution the objects get disordered.

Any Solutions or references???

推荐答案

不要使用WinForms.

抱歉,但这是最简单的解决方案. WinForms并不是很好,它们会自动调整大小并看起来不错.要么针对特定分辨率进行设计,要么坚持下去.如果您从Visual Studios的设计中脱颖而出,并且在中心区域的外部具有可调整大小的面板,那么您可以做得很好,但这取决于您的应用程序的用途.

如果对您来说是优先事项,那么可以考虑将WPF用于GUI设计:这样做要好得多.
Don''t use WinForms.

Sorry, but that''s the simplest solution. WinForms is just not good are automatically resizing and looking good. Either that or design it for a particular resolution, and stick to that. You can do quite well if you take a leaf out of Visual Studios'' design and have resizeable panels round the outside of a central area, but that will depend on what your application is for.

If it a priority for you, then consider using WPF for your GUI design instead: it is a whole lot better at that.


您可以通过适当使用TableLayoutPanels和Panel控件来做到这一点. ,适当的对接配置和所需的字体缩放.不幸的是,您将不得不自己尝试这些东西,并学习它们如何协同工作.没有人可以具体地分步告诉您该怎么做,因为我们看不到您的表单布局.
You can do this with the appropriate use of TableLayoutPanels, Panel controls, appropriate docking configurations, and font scaling as required. Unfortunately, you''ll have to experiment with this stuff yourself and learn how this all works together. Noone can tell you specifically step-by-step what to do because we cannot see your form layout.


我多次回答了类似的问题.请查看这些讨论和我的建议:

GUI外观-C#.Net [屏幕分辨率更改时,Zom Out发生故障 [ ^ ]

—SA
I answered similar Questions several times. Please see these discussions and my recommendations:

GUI Apperance - C#.Net[^]
Zom Out malfunctions when Screen resolution changes[^]

—SA


这篇关于在桌面应用程序中具有图形兼容性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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