set a reference in form2 to already open form1
In VB6 you could call any public method or variable in Form1 from Form2 by qualifying it with Form1
'IN FORM2
msgbox Form1.txtName.Text
in VB.NET though this doesnt work.
Let says I have a listview on Form1 that I want to access from form2. If I assign the form to an instance variable of that form
Dim x as New Form1
x.ListView1
this works, but it creates a new instance of Form1. If form1 is already open how can I set a reference to it in Form2 so I can access its controls?