Using ltmmPlayCtrl for Simple Playback (Visual Basic)
The ltmmPlayCtrl object allows the user to playback multimedia files. Using the following steps:
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 ltmmPlayCtrl Control, and add it to your form, Size and position the control, as you want it to appear at run time. | |
4. |
Add a button control to your form, and name it as follows: | |
|
Name |
Caption |
|
btnPlay |
Play |
5. |
Handle the Form’s Load event, and code Form_Load sub as follows: |
Private Sub Form_Load()
'Set the Source File
ltmmPlayCtrl1.SourceFile = "c:\source.avi"
End Sub
6. |
Handle the btnPlay Click event, and code btnPlay_Click Sub as follows: |
Private Sub btnPlay_Click()
ltmmPlayCtrl1.Run
End Sub
7. |
Run your program to test it. |