【发布时间】:2018-06-26 00:41:37
【问题描述】:
【问题讨论】:
-
请try on your own。向表单添加按钮是一项非常基本的任务。
【问题讨论】:
编写以下代码 onclick 按钮的事件,这是非常简单的任务。
//Creating New Button
Button btn = new Button();
//Adding Some text to button
btn.Text = "New Button";
//Specifing Location of Button to be placed
btn.Location = new Point(200, 200);
//Adding button to form
this.Controls.Add(btn);
试试上面的代码。
【讨论】: