Button newbutton = new Button();
newbutton.Text = "按下";
newbutton.Name = "button_new";
//newbutton.Height = 100;
//newbutton.Width = 50;
newbutton.Size = new Size(100, 50);
newbutton.Location = new Point(100, 100);
this.Controls.Add(newbutton);
C# 动态添加控件
最新推荐文章于 2024-08-28 12:05:11 发布