Opening and Handling Devices: Open with Shipped Dialog Box

Short source code snippet that illustrates how to open a device, using the shipped dialog box.
Language:.NET C#/Visual Basic
Version:3.0.3
Released on:April 7, 2005
Author:IC Imaging Control Support Department
Requirements:IC Imaging Control >2.1
Camera, converter or grabber with WDM Stream Class drivers.

The following programming example illustrates how you can use one of IC Imaging Control's built in dialog boxes. This dialog lets you select a device and determine its basic settings. When the user clicks "Open Device", the program stops the live video stream (.LiveStop). Then it activates the build-in-dialog that enables the end user to select a video capture device with .Showdevicesettingsdialog. After the user clicks on "OK", the program displays the live image data stream from the selected video capture device (.LiveStart).).

The built-in dialog looks as follows:

The dialog window of the sample application.

The sample application's window looks as follows:

The dialog window of the sample application.

[C#]
private void button1_Click(object sender, System.EventArgs e)
{
    if( icImagingControl1.LiveVideoRunning )
        icImagingControl1.LiveStop();

    icImagingControl1.ShowDeviceSettingsDialog();

    if( icImagingControl1.DeviceValid )
        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.