Help with Public (Variables? Constant? Public picturebox?)
Hello!
I have a question, I can't really find the answer...
Basically I have 2 Forms
In form number 1 I have 2 pictureboxes. I want to create a checkbox in form2 that says if checkbox 1 is checked then show picture 1 in form 1
I can't find the way to create those pictureoxes public..what am I doing wrong?
Re: Help with Public (Variables? Constant? Public picturebox?)
You can not access the PictureBoxes like this?:
Code:
Form1.PictureBox1.Image
Form1.PictureBox2.Image
Called in the code of Form2:
Code:
If Me.CheckBox1.Checked Then
Me.BackgroundImage = Form1.PictureBox1.Image
Else
Me.BackgroundImage = Form1.PictureBox2.Image
End If
The "Me" references to Form2.