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.3
Author:IC Imaging Control Support Department

Requirements:
Software: IC Imaging Control 3.3, Visual Studio™ 2010
Hardware:Camera, converter or grabber with WDM Stream Class drivers.
Download C# sampleOpen Device Using Dialog - C#

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();
}