Hi all,
I need some advice please on the best way to achieve a particular outcome...
My scenario...
I have a Form1 class, which is my main Form with a picture box on it.
I have a second class called camera that using an event handler grabs a frame (bitmap) from my webcam.
I then want to pass this frame to the picture box in the main form in the best fashion.
At the moment in the main form I have the code:
public static void setPB(Bitmap image)
{
var form = Form.ActiveForm as Form1;
form.pbWebCamDisplay = image;
}
then in the Camera class I use
Form1.setPB(currentFrame);
This works fine, however I wasn't sure if this was best programming practice? Is it possible to use custom events?
Thanks in advance for any help
Tom