如何在不同的屏幕分辨率下保持元素和控件的相对位置? [英] How to maintain relative position of elements and controls in different screen resolutions?

查看:147
本文介绍了如何在不同的屏幕分辨率下保持元素和控件的相对位置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在构建Windows窗体(全屏显示),并且在其中放置了各种控件.现在,当我尝试在具有不同屏幕分辨率的不同计算机(使用XP操作系统)中运行此命令时,我所有的控件都陷入困境,即它们的位置看起来很尴尬和糟糕.
有什么方法可以相对于屏幕放置控件吗?

解决方案

是的,请正确使用控件的停靠和锚点属性,您会没事的.


I''m building a windows form (in fullscreen) and i have placed various controls in it. Now when i try to run this in different computers (with XP Operating System) that have different screen resolutions, all my controls go haywire i.e their positioning looks awkward and bad.
Is there any way i can position the controls relative to the screen? Irrespective of the resolution?

解决方案

Yes, use the dock and anchor properties of your controls properly and you will be fine.


这篇关于如何在不同的屏幕分辨率下保持元素和控件的相对位置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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