The following code demonstrates how to convert without recompression
and force the preview to be active:
' Having an ltmmConvert object, ltmmConvertCtrl1:
Private Sub Form_Load()
' assign the input file
ltmmConvertCtrl1.sourcefile = "c:\source.avi"
' assign the output file
ltmmConvertCtrl1.TargetFile = "c:\target.avi"
' set the video no recompression
ltmmConvertCtrl1.VideoCompressors.selection = -1
' set the audio no recompression
ltmmConvertCtrl1.AudioCompressors.selection = -1
' set the output format to ISO (MP4)
ltmmConvertCtrl1.targetFormat = ltmmConvert_TargetFormat_ISO
On Error GoTo StartConvertError
' Assign the preview window handle to the Convert Ctrl property VideoWindowFrame
ltmmConvertCtrl1.VideoWindowFrame = PreviewWnd.hWnd
' Set Preview Property to True
ltmmConvertCtrl1.Preview = True
' Set ForceNoRecompressionPreview to True, this will Force the Preview to be active even when converting without recompression
ltmmConvertCtrl1.ForceNoRecompressionPreview = True
' now the convert object is ready to Preview the conversion process
' the user can display or hide preview during conversion
' this is done using the ltmmConvertCtrl1.PreviewVisible
' start the conversion
ltmmConvertCtrl1.StartConvert
Exit Sub
StartConvertError:
Dim txtStatus As String
txtStatus = Err.Description & "... Error " & CStr(Err.Number)
MsgBox txtStatus
End Sub