I give an alternative to do so:
First:
Create a class in witch u create a static string variable
Here is the procedure:
first step:
public class Variables
{
public static string myVariable ="";
}
Second step:
In the event handler ChildForm_Formclosing(object sender, EventArgs e)
implement it as follow
ChildForm_Formclosing(object sender, EventArgs e)
{
Variables.MyVariable=TextBox.Text.ToString();
}
Third step:
In the Main form
//define an instantiate a new ChildForm
ChildForm oChildForm = new ChildForm();
//Add a new event
oChildForm.FormClosing+= new EventHandler(ChildForm_FormClosing)
{
TextBox1.Text = Variables.MyVariable;
}