public Form1(string id) { try { InitializeComponent(); bntVideoFormat.Visible = false; bntVideoSource.Visible = false; ID = id; webcam = new WebCam(); webcam.InitializeWebCam(ref imgVideo); webcam.Start(); } catch { MessageBox.Show("the camera could not start, plz advise the secretary or an instructor"); Close(); } }
private void mainWinForm_Load(object sender, EventArgs e) { webcam = new WebCam(); webcam.InitializeWebCam(ref imgVideo); }