如何随着分辨率的变化自动调整大小和调整表单控件 [英] How to auto resize and adjust Form controls with change in resolution

查看:36
本文介绍了如何随着分辨率的变化自动调整大小和调整表单控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我注意到一些应用程序会改变它们的控件位置以尽可能地调整它们的分辨率,如果窗口最大化,它们会以这样一种方式设置自己,使整个 GUI 看起来平衡.我的问题是是否可以在 Visual Studio 2010 C# 中创建或实现此功能?

I have noticed that some applications change their controls position to adjust them as much as possible in the resolution as possible, If window is maximized they set themselves in such a way that over all GUI looks balanced. My question is that is it possible to make or implement this functionality in Visual studio 2010 C#?

推荐答案

使用 Dock锚定 属性.这里文章.请注意,这些将在最大化/最小化时处理更改.如果屏幕分辨率发生变化,这有点不同,但它会遵循相同的想法.

Use Dock and Anchor properties. Here is a good article. Note that these will handle changes when maximizing/minimizing. That is a little different that if the screen resolution changes, but it will be along the same idea.

这篇关于如何随着分辨率的变化自动调整大小和调整表单控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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