this is my code:
Private Sub AxWindowsMediaPlayer1_PlayStateChange(ByVal sender As System.Object, ByVal e As AxWMPLib._WMPOCXEvents_PlayStateChangeEvent) Handles AxWindowsMediaPlayer1.PlayStateChange
If AxWindowsMediaPlayer1.playState = WMPPlayState.wmppsMediaEnded Then
Dim str As Integer
'the original lblPlayItemIndex.Text = 0 : the index of the first item in the listview
str = lblPlayItemIndex.Text + 1
AxWindowsMediaPlayer1.URL = fmPlaylist.lstPlaylist.Items(str).Tag
AxWindowsMediaPlayer1.Ctlcontrols.play()
MsgBox("str: " & str)
End If
End Sub
I have a listview as a playlist for media player.... the .tag of each item in the listview is the path for the song
the "lblPlayItemIndex.Text" is the index of the listviewitem and when the song end ... it will make the "lblPlayItemIndex.Text" +1 to get the next item in the listview
actually I made it good....but the problem when I close the message the song stops of playing....
is there anything wrong in my code .... or should I make it with another way??!!