
| 语言: | .NET C#/Visual Basic |
| 版本: | 3.0.3 |
| 发布于: | 2005年4月7日 |
| 作者: | IC Imaging Control 技术支持部 |
| 系统要求: | IC Imaging Control >2.1 由WDM数据流类驱动程序驱动的相机、视频转换器或图像采集卡 |
| |
程序窗体如图所示:

程序首先在 listBox1 中里列出系统中所有视频捕捉设备的名称。 把listBox1.DataSource 属性设为 IcImagingControl.Devices,所有视频捕捉设备的名称都可以被列于listBox1中。
[C#] private void Form1_Load(object sender, System.EventArgs e) { listBox1.DataSource = icImagingControl1.Devices; }
当用户点击 "Open Device" 按钮后,程序停止视频数据流 (.LiveStop), 而后通过listBox1.SelectedItem获得所选设备, 而后显示现场图像(.LiveStart):
[C#] private void buttonOpen_Click(object sender, System.EventArgs e) { TIS.Imaging.Device dev = listBox1.SelectedItem as TIS.Imaging.Device; if( dev != null ) { icImagingControl1.LiveStop(); icImagingControl1.Device = dev; icImagingControl1.LiveStart(); } } private void buttonClose_Click(object sender, System.EventArgs e) { Close(); }
责任声明
IC Imaging Control 源代码库中的所有代码均只用于教学目的,The Imaging Source Europe GmbH 作为IC Imaging Control的开发制造商,不对任何由于使用本文或其中源代码所产生的后果承担责任。