Hello,
The following is a small VB.6 tutorial that shows how to use the
1. Start Visual Basic.
2. Add the LEAD Multi-Media controls to your project. On the Project pull-down menu, use the Components option, and select the LEAD Multi-Media Library (14).
3. Select the ltmmCaptureCtrl Control, and add it to your form, Size and position the control, as you want it to appear at run time.
4. Handle the Form’s Load event, and code Form_Load sub as follows:
Private Sub Form_Load()
'select first video device
ltmmCaptureCtrl1.VideoDevices.Selection = 0
'use preview
ltmmCaptureCtrl1.Preview = True
ltmmCaptureCtrl1.TargetFile = "c:\2.avi"
End Sub
5. Add a button and name it as follows:
Name Caption
btnTakePic Take SnapShot
6. Handle the btnStartCapture Click event, and code btnStartCapture_Click procedure as follows:
Private btnTakePic_Click()
ltmmCaptureCtrl1.StartCapture (ltmmCapture_Mode_Still)
ltmmCaptureCtrl1.SaveStillBitmap "C:\StillBitmap.cmp", ltmmCapture_StillFormat_CMP, 2, 0, -1
ltmmCaptureCtrl1.StopCapture
End Sub
7. Run your program to test it.
8. Save this project to use it as initial point for other tutorials.
Regards,
Maen Badwan
LEADTOOLS Technical Support