在VB.Net中移动控件以及更改表单大小 [英] Moving controls along with changing form size in VB.Net

查看:104
本文介绍了在VB.Net中移动控件以及更改表单大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我设计了一个表格.我已经建立并运行该表格.当我在运行时增加窗口大小时,控件将位于左上角.我需要将它们移动到表单的中心.我该怎么办?

I''ve designed a form. I''ve built and run the form. When i increase the window size while running, the controls stay on the top left corner. I need to move them to the center of the form. What should i do?

推荐答案

我已将控件放在面板中,并将面板的Anchor属性设置为None,并且可以使用.
i''ve put the controls in a panel and set the Anchor property of the panel to None and it works.


使用锚定或对接
http://msdn.microsoft.com/en-us/library/1w8z0xh4 (v = vs.80).aspx [
Use either Anchor or Docking
http://msdn.microsoft.com/en-us/library/1w8z0xh4(v=vs.80).aspx[^]


这篇关于在VB.Net中移动控件以及更改表单大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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