c#如何向动态生成的窗体添加控件?

2024-12-12 22:20:12
推荐回答(1个)
回答1:

Form from1 = new Form();
TextBox txt = new TextBox();
txt.Width = 200;
txt.Position = new Point(100, 100);
from1.AddControl(txt);
from1.Show();