private void btnPreview_Click(object sender, EventArgs e) { cam = new WebCam { Container = pbVideo }; cam.OpenConnection(); }