J
JAPSTER
I need to synchronize the contents of 2 textboxes that are on
different forms.
When I change the contents of the textbox on Form1, the contents of
the textbox on Form2 should be changed to show the same contents as
that of the textbox on Form1, and vice-versa.
Form1 is the startup form for the application, in which I add:
Dim frm2 as new Form2
then in Form1_Load event:
frm2.Show().
in Form1 textbox1_textchanged event:
frm2.Textbox1.Text = Textbox1.Text.
That is all fine.
Then Textbox1_TextChanged event in frm2 I add:
form1.textbox1.text = textbox1.text.
This last line of code is my problem. It seems to me that Form1, the
started form, instantiated by VB on startup, is not available to my
frm2.
I really there must be a simple explanation, but as I am new to
vb.net, it's done me.
Help appreciated.
different forms.
When I change the contents of the textbox on Form1, the contents of
the textbox on Form2 should be changed to show the same contents as
that of the textbox on Form1, and vice-versa.
Form1 is the startup form for the application, in which I add:
Dim frm2 as new Form2
then in Form1_Load event:
frm2.Show().
in Form1 textbox1_textchanged event:
frm2.Textbox1.Text = Textbox1.Text.
That is all fine.
Then Textbox1_TextChanged event in frm2 I add:
form1.textbox1.text = textbox1.text.
This last line of code is my problem. It seems to me that Form1, the
started form, instantiated by VB on startup, is not available to my
frm2.
I really there must be a simple explanation, but as I am new to
vb.net, it's done me.
Help appreciated.