Opening and Handling Devices: List Available Devices

Short source code snippet that illustrates how to list all video capture devices that are installed on a system and available to IC Imaging Control.
Language:.NET C#/Visual Basic
Version:3.0.3
Released on:April 9, 1965
Author:IC Imaging Control Support Department
Requirements:IC Imaging Control >2.1
Camera, converter or grabber with WDM Stream Class drivers.

The Testdialog of IC Imaging Control,

The functionality to list all video capture devices installed on a system is provided by the collection ICImagingControl.Devices . First of all, a listbox is dragged onto the form and labeled listBox1. The listbox is used to list all available video capture devices. To add the names of the video capture devices available on the system to the listbox, it's DataSource simply has to be set to icImagingControl1.Devices.

[C#]
private void Form1_Load(object sender, System.EventArgs e)
{
    listBox1.DataSource = icImagingControl1.Devices ;
}

Selecting a video capture device and starting the live video is simple:

[C#]
private void listBox1_SelectedIndexChanged(object sender, System.EventArgs e)
{
    icImagingControl1.Device = listBox1.SelectedItem.ToString();
    icImagingControl1.LiveStart();
}

Related Source Code Samples

Disclaimer
The source code that appears in the IC Imaging Control Source Code Library is indented for educational purposes only. The Imaging Source Europe GmbH, the manufacturer of IC Imaging Control, does not assume any kind of warranty expressed or implied, resulting from the use of the content of this page.

This site is part of The Imaging Source Network. Other sites include Company Portal, Image Processing, Astronomy Cameras, Astronomy Cameras Blog, Blog caméras d'astronomie, Astronomy Cameras Competition, TX Text Control, LiveDocx, phpLiveDocx and Forums.