Dear all,

Hope all in fine tune.

I am creating a media player project. I am taking the list of audio files (.mp3) in a list box. Now I want them to be played one by one starting from the top of the list box.

I am writing the code in a loop where I am taking a loop which runs from the 0th Index to the index=Items.Count-1

But while playing only the last song is played. How can I rectify this problem. Please help me.

Code:
Private Sub PlaySong()
        Dim i As Integer
        i = 0
        Do While i < Playlist.Items.Count
            Playlist.GetSelected(i)
            PlayerControl.URL = Playlist.Items.Item(i)
            If PlayerControl.URL <> "" Then
                'PlayerControl.Ctlcontrols.play()
                'DurationTimer.Enabled = True
            Else
                DurationTimer.Enabled = False
            End If
            i = i + 1
        Loop
    End Sub