根据屏幕分辨率更改Windows窗体分辨率 [英] Change the windows form resolution according the screen resolution

查看:164
本文介绍了根据屏幕分辨率更改Windows窗体分辨率的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在vb.net中以1280 * 800的分辨率开发了一个应用程序.
当我在分辨率低于我开发的m/c上安装应用程序时..
运行时如何执行此操作...否则,我必须重新开发整个项目.

I have developed an application in vb.net in 1280*800 resolution.
When I install the application on m/c where resolution is lesser than I developed..
how to do it while runtime...else I have to re-develop whole project.

推荐答案

降低分辨率非常棘手:如果您填满了可用的屏幕1280 * 800的空间,那么您就必须按比例缩小所有控件的大小.尽管在WPF中这很简单,但在Winforms中并没有什么真正可以帮助您的.

我建议您只能做的是重新设计屏幕布局,以便在屏幕分辨率上获得更大的灵活性(请参阅VS如何显示事物,以举例说明如何实现灵活性),或者您是针对初始设计而设计的?较低的分辨率.

抱歉,但这就是这样.
Reducing the resolution is very tricky: if you have filled the available screen space at 1280*800 then you would have to reduce the size of all your controls proportionately. While this is fairly simple in WPF, in Winforms there is nothing to really help you.

I would suggest that the only thing you can do is look at redesigning your screen layout to allow for greater flexibility in the screen resolution (look at how VS shows things for an example of how to design for flexibility) or do you initial design for a lower resolution.

Sorry, but that''s the way it goes.


我完全同意曼弗雷德的回答.灵活的设计不是那么简单.

请在这里查看我的建议: GUI外观-C#.Net [ ^ ]和此处屏幕分辨率更改时,Zom Out发生故障 [ ^ ].

祝你好运,
—SA
I''m absolutely agree with Manfred''s answer. The flexible design is not so simple.

Please look at my recommendations here: GUI Apperance - C#.Net[^] and here Zom Out malfunctions when Screen resolution changes[^].

Good luck,
—SA


您可以在应用程序中使用锚点选项
you can use anchor option in your application


这篇关于根据屏幕分辨率更改Windows窗体分辨率的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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