111,094
社区成员




public partial class Form1 : Form
{
TextBox txtBox;
public Form1()
{
InitializeComponent();
this.Text = "我是窗体1";
txtBox = new TextBox();
this.Controls.Add(txtBox);
Form2 f2 = new Form2() { Text = "我是窗体2" };
f2.ShowDialog(this);
txtBox.Text = f2.txtBox.Text;
}
}
public class Form2 : Form
{
public TextBox txtBox;
public Form2()
{
txtBox = new TextBox();
this.Controls.Add(txtBox);
}
}