Visual Studio - Access PictureBox outside Form1 class?
Ive been trying all day now to get control over a form designer added picturebox from a different class without success.
ive tried from my new class
and i get the following error:
PictureBox renderWindow = Form1.pictureBox1;
I need to somehow access the pictureBox from outside the class since im going to have both webcam playback ( captureDevice.Render(); ) and video playback ( videoPlayback.Render(); ) and they both need to take control over the designer generated picturebox. Any ideas on how i can span the picturebox over several classes (or) copy the picturebox to each class and have it render in the same place?
1 'programnamespace.Form1.pictureBox1' is inaccessible due to its protection level
2 An object reference is required for the non-static field, method, or property 'programnamespace.Form1.pictureBox1'
Im running out of ideas, any suggestions?