Summary description for MainForm.
Inheritance: ISampleGrabberCB, IDisposable
Exemplo n.º 1
0
 private static void Disconnect()
 {
     if (useAvicap)
     {
         if (hWnd != IntPtr.Zero) SendMessage(hWnd, WM_CAP_DISCONNECT, hWnd.ToInt32(), 0);
         hWnd = IntPtr.Zero;
     }
     else
     {
         if (null != cam) cam.Dispose();
         cam = null;
     }
     connected = false;
 }
Exemplo n.º 2
0
 private static void CamThread()
 {
     cam = new Capture();
     while (connected)
     {
         if (timer.Enabled) bitmap = new System.Drawing.Bitmap(cam.Width, cam.Height, cam.Stride, System.Drawing.Imaging.PixelFormat.Format24bppRgb, cam.GetBitMap());
         Thread.Sleep(1);
     }
 }