代码如下: Button btn = new Button();
btn.Location = new System.Drawing.Point(100, 100);
btn.Size = new System.Drawing.Size(100, 50);
btn.Text = "button New";
this.Controls.AddRange(new System.Windows.Forms.Control[] {btn});
btn.Location = new System.Drawing.Point(100, 100);
btn.Size = new System.Drawing.Size(100, 50);
btn.Text = "button New";
this.Controls.AddRange(new System.Windows.Forms.Control[] {btn});
{
Button b1 = new Button();
Label label1 = new Label();
// Initialize the controls and their bounds.
label1.Text = "First Name";
label1.Location = new Point(48,48);
label1.Size = new Size (104, 16);
b1.Text = "";
b1.Location = new Point(48, 64);//制定你的位置
b1.Size = new Size(104,16);
// Add the TextBox control to the form's control collection.
Controls.Add(b1);
// Add the Label control to the form's control collection.
Controls.Add(label1);
}
还有一个关于在html里显示form的问题,现在贴出来帮忙看看:)