VideoFormats.FindIndex Method

Searches the collection for a given string. The string contains the name of a video format.
Syntax:
Public Function FindIndex(Name As String) As Long
Parameter Description
Name

Specifies the name of the video format for which to search in the collection.

Return Value:

If the property Name of an VideoFormat object is equal to the given string, the FindIndex method returns the index of this object in the collection. If the string is not found, the FindIndex method returns -1.

Sample:

This example tests whether the "RGB24 (320x240)" video format is available:

Dim VidFmtCol As VideoFormats
Dim Index As long
Set VidFmtCol = ICImagingControl1.VideoFormats
Index = VidFmtCol.FindIndex("RGB24 (320x240)")
If Index = -1 Then
    ' video format not available
Else
    ' do something
End If
See also: VideoFormats, VideoFormat, VideoFormats.Count, VideoFormats.Item

<< ICImagingControl.VideoFormats