private void button1_Click(object sender, EventArgs e)
{
if (form2.ShowDialog() == DialogResult.OK)
{
textBox1.Text= form2.A;//将子窗体值赋予 textBox1
}
}
{
public Form2()
{
InitializeComponent();
}
public string A;
private void button1_Click(object sender, EventArgs e)
{
A = textBox1.Text;
this.DialogResult = DialogResult.OK;
this.Hide();
}