ltmmVideoFormats.Count Example for Visual Basic
Private Sub mnVideoFormats_Click()
Dim lIndex As Long
Dim lCount As Long
Dim lWidth As Long
Dim lHeight As Long
Dim lCompression As Long
Dim lBitCount As Long
Dim SubTypeName As String
Dim SubTypeFriendlyName As String
Dim Subtype As String
Dim pVidFormat As ltmmVideoFormat
If LTMMCapture.VideoCaptureFormats Is Nothing Then
End
End If
lCount = LTMMCapture.VideoCaptureFormats.Count
If LTMMCapture.VideoCaptureFormats.Selection <> 0 Then
LTMMCapture.VideoCaptureFormats.Selection = 0
End If
Set pVidFormat = LTMMCapture.VideoCaptureFormats.Item(0)
If pVidFormat.Selected = False Then
pVidFormat.Selected = True
End If
SubTypeName = pVidFormat.SubTypeName
SubTypeFriendlyName = pVidFormat.SubTypeFriendlyName
lWidth = pVidFormat.Width
lHeight = pVidFormat.Height
lCompression = pVidFormat.Compression
lBitCount = pVidFormat.BitCount
lIndex = LTMMCapture.VideoCaptureFormats.Find(ltmmMEDIASUBTYPE_RGB24, 1024, 768)
Set pVidFormat = Nothing
End Sub