I'm stumped right now, I cannot figure out how to code something to get information from another form.
This is what I'm trying to do:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If TextBox1.Text = "01" Then 'TextBox1 is in form 2.
PictureBox1.Image = System.Drawing.Bitmap.FromFile(My.Application.Info.DirectoryPath & "\Image00001.png") 'PictureBox1 is in form 1.
ElseIf TextBox1.Text = "02" Then 'TextBox1 is in form 2.
PictureBox1.Image = System.Drawing.Bitmap.FromFile(My.Application.Info.DirectoryPath & "\Image00002.png") 'PictureBox1 is in form 1.
End If
End Sub
When I use that code, it tells me that PictureBox1 is not declared, it's because it's not in the same form as TextBox1 and the button.
I know it's probably extremely simple, but I just can't figure it out.