Convert Example for Visual Basic
' This function should be called before beginning the conversion process
Public Sub BeforeConversion()
If ltmmConvert.VideoWindowHandle <> 0 Then
If ((ltmmConvert.VideoWidth > ltmmConvert.VideoWindowWidth) And (ltmmConvert.VideoHeight > ltmmConvert.VideoWindowHeight)) And (ltmmConvert.VideoWindowSizeMode <> ltmmFit) Then
ltmmConvert.VideoWindowSizeMode = ltmmFit
ElseIf (ltmmConvert.VideoWidth < ltmmConvert.VideoWindowWidth) And (ltmmConvert.VideoHeight < ltmmConvert.VideoWindowHeight) Then
ltmmConvert.VideoWindowSizeMode = ltmmStretch
End If
ltmmConvert.SetVideoWindowPos ltmmConvert.VideoWindowLeft, ltmmConvert.VideoWindowTop, ltmmConvert.VideoWindowWidth, ltmmConvert.VideoWindowHeight
End If
ltmmConvert.EnableStillCapture= True
If ltmmConvert.StillCaptureLimit <= 1000 Then
ltmmConvert.StillCaptureLimit = 10000
End If
If ltmmConvert.FullScreenMode = True Then
' Just to show how to use put_FullScreenMode
ltmmConvert.ToggleFullScreenMode
' Use FullScreenMode = False to turn off the full screen mode
ltmmConvert.FullScreenMode = False
End If
ltmmConvert.OpenLogFile "C:\convert.log", ltmmLogFile_GeneralInfo
End Sub
' Use this function to save a snapshot from the running stream to a file
Public i As Integer
Public Sub TakeSnapShots()
Dim szFileName As String
If ltmmConvert.EnableStillCapture = True Then
szFileName = "c:\\SnapShot" + CStr(i) + ".cmp"
i = i + 1
ltmmConvert.SaveStillBitmap szFileName, ltmmConvert_StillFormat_CMP, 2, 0, -1
End If
End Sub
' Call this function after the conversion process is finished.
Public Sub EndConversion()
ltmmConvert.CloseLogFile
End Sub