Hello all. I am teaching myself C# and I have been fairly dedicated to solving my own problems. However, for some reason I am just stumped.
I have a main form that manages alot of data. To insert data into the form you push a button to bring up a wizard (another form). In that form you enter your data then press submit.
What I want to happen is the data is listed in a list box on the main form. The wizard will stay open after submit is clicked. So I need something that only pulls the information into the main form when the submit button is clicked.
I thought this should be easy. However, referencing the list box in the primary form wants an object reference for the primary form. If I create a new reference, such as: Form1 myform = new Form1();
It doesn't work. Presumably because i am creating a new instance of form1 instead of using the existing form.
What is the simplist way for me to get the existing object reference for the primary form?
Thank you for your help.