窗体中控件的基本操作

当控件添加到窗体中之后,用户可以使用多种方式对它们进行操作,如对齐、调整大小、顺序、调整间距等

 

大小:菜单工具栏图标代码

 

顺序:选择控件【格式】【顺序】|【置于底层】/【置于顶层】。

代码实现:bringtofrom方法和sendtoback方法

Button1.size=new size200,200);//按钮大小调整

Button2.Bringtofront();//置于顶层

Button3.sendtoback();//置于底层

Button7.location=new system.Drwing.point(200,200);//定位在200-200位置上

 

原文地址:https://www.cnblogs.com/xiaowie/p/8608889.html