Please changes the field names as you required. Also following code will update the rich text box value concurrently when textfield value in form2 is changed. You may want to do minor changes to trigger it on button change event.
Add the following method to your From1
private void SetChildFromValueToParent(object obj, EventArgs args)
{
//Read the child form's control value and set it to parent form field
txtBox.Text = ((TextBox)(obj)).Value.ToString();
}
Add the following logic to your Form1
button click which opens the Form2
private void button1_Click(object sender, EventArgs e)
{
ChildForm childForm = new ChildForm();
//Find the textbox control in the child form
Control[] controls = childForm.Controls.Find("textBox", true);
if (null != controls[0])
{
//Bind the method in the parent form to child form text control's TextChanged event
controls[0].TextChanged += new System.EventHandler(SetChildFromValueToParent);
}
childForm.ShowDialog();
}
EDIT - Getting value on Button Click
private void SetChildFromValueToParent(object obj, EventArgs args)
{
//Read the child form's control value and set it to parent form field
Form2 from2 = new Form2();
string richTextBox.Text = ((TextBox)form2.Controls["textBox1"]).Text;
}