J
johnb41
I can't believe i'm stumbling on such a seemingly minor task. I have a
major mental block here.
I have boiled down the problem to it's most basic form:
I have form1 and form2. Form1 has a blank label. Form2 has a button.
When clicked, i want to add hard coded text to Form1.
Code for form1: (simply opens up form2)
Private Sub Button1_Click(...) Handles Button1.Click
Dim form2 As New Form2
form2.Show()
End Sub
Code for form2: (writes text to form1)
Dim form1 As New Form1
Private Sub Button1_Click(...) Handles Button1.Click
form1.Label1.Text = "Sample text"
End Sub
Nothing happens! In my real life app, i want to display an image in a
picturebox on a different form from the currently active form.
Help anyone?
Thanks very much!
John
major mental block here.
I have boiled down the problem to it's most basic form:
I have form1 and form2. Form1 has a blank label. Form2 has a button.
When clicked, i want to add hard coded text to Form1.
Code for form1: (simply opens up form2)
Private Sub Button1_Click(...) Handles Button1.Click
Dim form2 As New Form2
form2.Show()
End Sub
Code for form2: (writes text to form1)
Dim form1 As New Form1
Private Sub Button1_Click(...) Handles Button1.Click
form1.Label1.Text = "Sample text"
End Sub
Nothing happens! In my real life app, i want to display an image in a
picturebox on a different form from the currently active form.
Help anyone?
Thanks very much!
John