IC Imaging Control ActiveX

ICImagingControl.VideoFormats Property

ICImagingControl.VideoFormats Property

Returns a collection of available video formats for the current device and video norm.
Syntax:
Public VideoFormats As VideoFormats
Limitations:

Run time only, read only. Only available when a device is open and valid. Not available in live mode.

Sample:

This example displays all available video formats of the current selected video capture device in a combo box. If no video formats 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 video formats is named "cboVideoFormat" in this example.

Private Sub UpdateVideoFormats()
    Dim Name As String
    Dim VidFmtCol As VideoFormats
    Dim Item As Variant
    Dim Idx As Long
    Idx = -1
    Set VidFmtCol = ImagingControl.VideoFormats
    cboVideoFormat.Clear
    If VidFmtCol.Count > 0 Then
        ' If video formats have been found, add them to the
        ' combo box.
        For Each Item In VidFmtCol
            cboVideoFormat.AddItem Item.Name
        Next
        cboVideoFormat.Enabled = True
        Name = ImagingControl.VideoFormat
        Idx = VidFmtCol.FindIndex(Name)
        If Idx <> -1 Then
                cboVideoFormat.ListIndex = Idx - 1
        Else
            cboVideoFormat.ListIndex = 0
        End If
    Else
        ' No video formats have been found.
        cboVideoFormat.AddItem "n/a"
        cboVideoFormat.Enabled = False
        cboVideoFormat.ListIndex = 0
    End If
End Sub

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

See also: ICImagingControl, VideoFormats, VideoFormat

<< ICImagingControl

Get in touch with us


About The Imaging Source

Established in 1990, The Imaging Source is one of the leading manufacturers of industrial cameras, frame grabbers and video converters for production automation, quality assurance, logistics, medicine, science and security.

Our comprehensive range of cameras with USB 3.1, USB 3.0, USB 2.0, GigE interfaces and other innovative machine vision products are renowned for their high quality and ability to meet the performance requirements of demanding applications.

Automated Imaging Association ISO 9001:2015 certified

Contact us