public frmCamera() { InitializeComponent(); camera = new WebCamera(); ls1 = new List<DeviceInfo>(); foreach (DeviceInfo info in camera.GetCameras()) { ls1.Add(info); } camera.NewFrameEvent += new NewFrameEventHandler(camera_NewFrameEvent); Control.CheckForIllegalCrossThreadCalls = false; }
public frmCamera() { InitializeComponent(); camera = new WebCamera(); ls1 = new List <DeviceInfo>(); foreach (DeviceInfo info in camera.GetCameras()) { ls1.Add(info); } camera.NewFrameEvent += new NewFrameEventHandler(camera_NewFrameEvent); Control.CheckForIllegalCrossThreadCalls = false; }