1. 程式人生 > >窗體中控件的基本操作

窗體中控件的基本操作

方式 style cat body oca 使用 from spa 基本

當控件添加到窗體中之後,用戶可以使用多種方式對它們進行操作,如對齊、調整大小、順序、調整間距等

大小:菜單工具欄圖標代碼

順序:選擇控件【格式】【順序】|【置於底層】/【置於頂層】。

代碼實現:bringtofrom方法和sendtoback方法

Button1.size=new size200,200);//按鈕大小調整

Button2.Bringtofront();//置於頂層

Button3.sendtoback();//置於底層

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

窗體中控件的基本操作