:
, Form1 Form2 :

"txtBoxForm1" Form1 Form2, "txtBoxForm2" Form2. , Form2 , [Return to Form1], "txtBoxForm2" , ( ) "txtBoxForm1" Form1.
:
1) Form1 Form2, ShowDialog():
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void btnSend_Click(object sender, EventArgs e)
{
Form2 f2 = new Form2();
f2.ShowDialog(ref txtBoxForm1);
}
}
'txtBoxForm1', . , Form2, Form1 , Form2.
Form1, , , f2.ShowDialog().
2) () ShowDialog():
public partial class Form2 : Form
{
public Form2()
{
InitializeComponent();
}
private void btnReturn_Click(object sender, EventArgs e)
{
this.Close();
}
public void ShowDialog(ref TextBox txtBoxForm1)
{
txtBoxForm2.Text = txtBoxForm1.Text;
this.ShowDialog();
txtBoxForm1.Text = txtBoxForm2.Text;
}
}
(Form2 ), , . . , ShowDialog(), Form2() Form1, .
Form2() ShowDialog() Form2. , '(ref txtBoxForm1) , .
( ) #.net. ShowDialog(), , Framework ShowDialog().net 'this.ShowDialog();' .
.
, !