C# 动态生成控件

2025-04-15 01:42:25
推荐回答(1个)
回答1:

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