//Creating Instance of WebCam Class. private void CapturePhoto_Load(object sender, EventArgs e) { oWebCam = new WebCamera(); oWebCam.Container = pictureBox1; oWebCam.OpenConnection(); Clipboard.Clear(); }
private void btnRefresh_Click(object sender, EventArgs e) { oWebCam.CloseConnection(); oWebCam.Dispose(); oWebCam = new WebCamera(); oWebCam.Container = pictureBox1; oWebCam.OpenConnection(); Clipboard.Clear(); }