Page 1 of 1

Clear Playlist in ActiveX Control

Posted: 07 Mar 2009 13:05
by InsureMan
Have VLC as an ActiveX embedded in an Access form and control VLC with Access VB code. Have Access load 20 media files and the playing and navigating through these is fine. My issue is that if I use the following code to try and clear the Playlist:

Public mobjPlayer As VLCPlugin2

Set mobjPlayer = Me!VLCPlayer.Object
With mobjPlayer
.playlist.Clear
End With

Then run the:
Dim lngX As Long
Set mobjPlayer = Me!VLCPlayer.Object
lngX = mobjPlayer.playlist.items.Count()
MsgBox "There is " & lngX & " Items in Playlist", vbInformation, ""

to check if no files are still loaded and the reporting is Nil

If I then load a new bunch of files and then go and play these it always starts with the very last files I was playing. It would seem that there is a residual entry left in the Playlist. Can someone assist with code that will completely empty the Playlist.

Thanks

Re: Clear Playlist in ActiveX Control

Posted: 08 Mar 2009 09:42
by InsureMan
Problem Solved - After Adding new entries to Playlist ran code in this order

.playlist.playItem (0)
.playlist.Next

This moved to the start of the new entries