mike Delvotti

mike Delvotti

  • NA
  • 262
  • 0

Passing data back to open form

Aug 25 2011 7:13 AM
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.

Answers (1)