Hi Guys, I'm trying to pass data back to my open form in the background, now I can achieve this with the below code, but the trouble is it opens another instance of the form that is already open in the background, I simply want to send the data from form2 to the already open form1 then close form2. Is there a better method than below.
//my code on form 2
form1 form1 = new form1()
form1.Show();
form1.address1TextBox.Text = txtStreet.Text;
The above code ends up with form1 open twice.
Passing data back to open form
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

mike DelvottiRank #7,298 · 244 reputationPosted Aug 25, 2011, 4:39 AM EDT
((form1)Application.OpenForms["form1"]).address1TextBox.Text = txtStreet.Text;