Use ltmmPlayCtrl for Simple Playback (Visual FoxPro 6.0)

The ltmmPlayCtrl object allows the user to playback multimedia files. Using the following steps:

1.

Start Visual FoxPro 6.

2.

If you didn’t install LEAD Multi-Media controls before, install them.

On the Tools pull-down menu, choose Options… and go to the Controls tab. Click the ActiveX controls radio button. Mark the ltmmPlayCtrl Class and click the Set As Default button, then click OK.

3.

Create a new blank form. On the Form controls toolbar, press the View Classes button and select ActiveX controls. Add the ltmmPlayCtrl to your form and change its name to ltmmPlayCtrl1. 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.

Code the Form Init procedure as follows:

ThisForm.ltmmPlayCtrl1.AutoStart = .F.
ThisForm.ltmmPlayCtrl1.SourceFile = "c:\source.avi"

6.

Code the btnPlay Click procedure as follows.

ThisForm.ltmmPlayCtrl1.Run

7.

Run your program to test it.