ICImagingControl.InputChannels Property

Returns a collection of available input channels for the current video capture device.
Syntax:
Public InputChannels As InputChannels
Limitations:

Run time only, read only. Only available when a device is open and valid.

Sample:

This example displays all available input channels in a combo box. If no input channels are available, the text "n/a" will be displayed in the combo box. In this case the combo box will be disabled. The combo box for the input channels is named "cboInputChannel" in this example.

Private Sub UpdateInputChannels()
    Dim Name As String
    Dim ChannelCollection As InputChannels
    Dim Item As Variant
    Dim Idx As Long
    Idx = -1
    Set ChannelCollection = ImagingControl.InputChannels

    cboInputChannel.Clear
    If ChannelCollection.Count > 0 Then
        ' If input channels have been found,
        ' add them to the combo box.
        For Each Item In ChannelCollection
            cboInputChannel.AddItem Item.Name
        Next

        Name = ImagingControl.InputChannel
        Idx = ChannelCollection.FindIndex(Name)

        If Idx <> -1 Then
            cboInputChannel.ListIndex = Idx - 1
        Else
            cboInputChannel.ListIndex = 0
        End If
        cboInputChannel.Enabled = True
    Else
        ' No input channels have been found.
        cboInputChannel.AddItem "n/a"
        cboInputChannel.Enabled = False
        cboInputChannel.ListIndex = 0
    End If
End Sub

A complete example of how to get the video capture device properties can be found in the Making Device Settings chapter.

See also: ICImagingControl, InputChannels, ICImagingControl.InputChannelAvailable, ICImagingControl.InputChannel

<< ICImagingControl