Mp3's using winmm.dll

I can play an mp3 sending a string to the winmm.dll
But how can you test if the song has finished before sending another song?
Who is Participating?
sharmonConnect With a Mentor Commented:
You know how to send the string to play it, so why don't you just send the string to get the current mode and position.  Where mp3 is the alias of your open connection to winmm.dll

"status mp3 position"
"status mp3 mode"

If you want a good example of how to do everything, see this link...
never used winmm.dll, however you could use the windows media player. here is some sample code, just make sure you go to components and add windows media player.

Private Sub MediaPlayer1_PlayStateChange(ByVal OldState As Long, ByVal NewState As Long)

If OldState = 2 Then
  'play a song, because there is no song playing
  MediaPlayer1.Open ("C:\my music\amarillobymorning.mp3")
End If

End Sub
codesucksAuthor Commented:
I am not keen on using windows media player.... too resource hungry.

Thanks for the link, have downloaded the code and will investigate.

codesucksAuthor Commented:
The link was to a very nice piece of well documented code that solved my query.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.