If I create a new form, say Form2, in order to use it in a programme I must create an instance of it:
If Form2 has a text box on it I can put this code in Form1:
But what happens if I want to refer to an object (a text box)in Form1 with code in frmTwo? This doesn't work:
How is the instance of Form1 created? And How do I refer to it?
Can someone explain this before I pull all my hair out!
Thx.
VB.NET:
Dim frmTwo and new Form2
If Form2 has a text box on it I can put this code in Form1:
VB.NET:
frmTwo.Textbox1.Text="Hello"
But what happens if I want to refer to an object (a text box)in Form1 with code in frmTwo? This doesn't work:
VB.NET:
Form1.TextBox1.Text="Goodbye"
How is the instance of Form1 created? And How do I refer to it?
Can someone explain this before I pull all my hair out!
Thx.