Пример #1
0
 /// <summary>
 /// 开始监控
 /// </summary>
 private void startMonitor()
 {
     if (VideoOperate.VCAInitSdk(this.Handle, VideoOperate.DISPLAYTRANSTYPE.PCI_MEMORY_VIDEOMEMORY, false))
     {
         m_dwDevNum = VideoOperate.VCAGetDevNum();
         if (m_dwDevNum == 0)
         {
             MessageBox.Show("VC404卡驱动程序没有安装");
         }
         else
         {
             for (int i = 0; i < m_dwDevNum; i++)
             {
                 foreach (Control ctl in this.Controls)
                 {
                     if ((ctl is Panel) && (ctl.Name == "plVideo" + (i + 1)))
                     {
                         VideoOperate.VCAOpenDevice(i, ctl.Handle);
                         VideoOperate.VCAStartVideoPreview(i);
                     }
                 }
             }
         }
     }
 }
Пример #2
0
 //开始监控
 protected void startMonitor()
 {
     if (VideoOperate.VCAInitSdk(this.Handle, VideoOperate.DISPLAYTRANSTYPE.PCI_MEMORY_VIDEOMEMORY, false))
     {
         m_dwDevNum = VideoOperate.VCAGetDevNum();
         if (m_dwDevNum == 0)
         {
             MessageBox.Show("VC404卡驱动程序没有安装");
         }
         else
         {
             for (int i = 0; i < m_dwDevNum; i++)
             {
                 VideoOperate.VCAOpenDevice(i, plVideo1.Handle);
                 VideoOperate.VCAStartVideoPreview(i);
             }
         }
     }
 }