public void hwc() { webcam = new WebCam(); webcam.InitializeWebCam(ref pictureBox1); webcam.Start(); backgroundWorker4.RunWorkerAsync(); }
private void button2_Click(object sender, EventArgs e) { pictureBox1.Image = pictureBox1.InitialImage; if (camonoroff == 0) { webcam.Start(); camonoroff = 1; incall1 = 1; } else { //WebCam webcam1 = new WebCam(); //webcam1.InitializeWebCam(ref pictureBox1); //webcam = webcam1; //webcam.Continue(); incall1 = 1; } //Thread t = new Thread(new ThreadStart(hwc)); //t.Start(); //backgroundWorker5.RunWorkerAsync(); }