WinForm窗体中窗口控件的生成

1:button控件的生成方式

Button button = new Button();
button.Size = new Size(80, 80);
button.Location = new Point(10, 10);
button.Text = "aa";
this.Controls.Add(button);

注意:生成的控件需要添加到窗口的控件当中去,其实现代码his.Controls.Add(button);

posted @ 2019-05-28 10:30  玄~轩逸  阅读(341)  评论(0编辑  收藏  举报