日期:2014-05-18 浏览次数:21338 次
private void button1_Click(object sender, EventArgs e) { TextBox tbox = new TextBox(); tbox.Text = "add"; tbox.Location = new Point(30, 50); this.Controls.Add(tbox); }
------解决方案--------------------
private void button1_Click(object sender, EventArgs e)
{
TextBox tb = new TextBox();
tb.Height = 50;
tb.Width = 100;
tb.Location = new Point(100, 100);
this.Controls.Add(tb);
}
------解决方案--------------------