设备的开启与操作: 开启多台设备

这个示例程序演示的是如何同时开启两台视频设备并将其实时画面显示在计算机屏幕上。
语言: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.