Fixed that bit - now another question
Hello again
Right, I got details on how to set up the MediaPlayer control as part of a form from the Microsoft website, so I can now play a file successfully. Now I want to play another straight afterwards (like on an album).
The problem is, the code I run to play the next song is triggered by a change of playstate (when media ends) and it doesn't work. I can step through and see that it's running properly and check that the MediaPlayer controls are being processed correctly; they just don't do anything.
My code is as follows:
Private Sub PlaySong()
Dim FileName As String
FileName = TrackDetails(CurrentTrack).Item("FileName")
MediaPlayer1.Ctlcontrols.stop()
MediaPlayer1.URL = FileName
MediaPlayer1.Ctlcontrols.play()
End Sub
I'm running this when I click on a track and when a track finishes. It works for the MouseDown event but not for when the play state has changed.
Any ideas welcome!
Firebeard