Opening and Handling Devices: Open with Shipped Dialog Box

The following programming example (Visual Basic 6) shows how you can use IC Imaging Control to open a device.
Language:Visual Basic 6
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 dialog window of the sample application.

The following programming example (Visual Basic™ 6) 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 (see image on the right). When the user clicks "Open Device", first off all the program stops the image data stream (.LiveStop) before it activates the dialog "Device Settings" with .Showdevicesettingsdialog. After the user clicks on "OK", our program displays the selected device's live image data stream:

The sample application's window looks as follows:

The dialog window of the sample application.

Private Sub btnOpenDevice_Click()

    If ICImagingControl1.LiveVideoRunning Then
        ICImagingControl1.LiveStop
    End If

    ICImagingControl1.ShowDeviceSettingsDialog

    If ICImagingControl1.DeviceValid Then
        ICImagingControl1.LiveStart
    End If

End Sub

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.