設備的開啟與操作: 開啟多台設備

這個示例程序演示的是如何同時開啟兩台視頻設備並將其實時畫面顯示在計算機屏幕上。
語言:Visual Basic 6
版本:3.0.3
发布于:2005年4月7日
作者:IC Imaging Control 技術支持部
需求:IC Imaging Control >2.1
由WDM數據流類驅動程序驅動的相機、視頻轉換器或圖像採集卡

程序窗體如圖所示:

The dialog window of the sample application.

用戶點擊 "Open Device 1..." 按鈕後,程序首先停止視頻數據流(.LiveStop)。 而後 .ShowDeviceSettingsDialog 語句將打開用於選擇設備的內置對話框。 之後通過.LiveStart顯示設備傳來的現場視頻:

Private Sub btnOpenDevice1_Click()

    If ICImagingControl1.LiveVideoRunning Then
        ICImagingControl1.LiveStop
    End If

    ICImagingControl1.ShowDeviceSettingsDialog

    If ICImagingControl1.DeviceValid Then
        ICImagingControl1.LiveStart
    End If

End Sub

為了同時顯示另一個現場視頻數據流,我們需要向程序窗體內拖入第二個IC Imaging Control控件:

Private Sub btnOpenDevice2_Click()

    If ICImagingControl2.LiveVideoRunning Then
        ICImagingControl2.LiveStop
    End If

    ICImagingControl2.ShowDeviceSettingsDialog

    If ICImagingControl2.DeviceValid Then
        ICImagingControl2.LiveStart
    End If

End Sub

相關源代碼示例

責任聲明
IC Imaging Control源代碼庫中的所有代碼均只用於教學目的,The Imaging Source Europe GmbH作為IC Imaging Control的開發製造商,不對任何由於使用本文或其中源代碼所產生的後果承擔責任。

该网站为The Imaging Source网络的一部分。其它的站点包括 公司, Imaging, 天文相機, Astronomy Cameras Blog, Blog caméras d'astronomie, 天文相機有獎競答, TX Text Control, LiveDocx, phpLiveDocxForum.