Programmatically Inserting a Processor Filter (Visual Basic)

Assume you want to insert the Emboss as first filter to the play object.

1.

Start with the project that you created in Using ltmmPlayCtrl for Simple Playback.

2.

Add button control to your form, and name it as follows:

 

Name

Caption

 

btnSelectFilter

Select Filter

3.

Handle the btnSelectFilter Click event, and code btnSelectFilter_Click procedure as follows.

Private Sub btnSelectFilter_Click()
   Dim nIndex As Integer

   'The string below is retrieved from the Filters List utility
   nIndex = ltmmPlayCtrl1.VideoProcessors.Find ("@device:sw:{E526D606-22E7-494C-B81E-AC0A94BFE603}\{E2B7DB17-38C5-11D5-91F6-00104BDB8FF9}")
   ltmmPlayCtrl1.SelectedVideoProcessors.Add ltmmPlayCtrl1.VideoProcessors.Item (nIndex), 0
End Sub

4.

Run your program to test it.