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 button1_Click(object sender, EventArgs e) { webcam.Start(); }