Hi & Good Afternoon,
I've got the following code that populates a Listbox with Songs from my PC.
To add a song to a playlist you just double click on the required song. You can then play the playlist by pressing the Play button.Code:Private Sub frmMain_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load Dim allMusic() As String = My.Computer.FileSystem.GetFiles(Environment.GetFolderPath(Environment.SpecialFolder.MyMusic), FileIO.SearchOption.SearchAllSubDirectories, "*.mp3", "*.wma").ToArray lstSongs.Items.AddRange(allMusic) End Sub Private Sub lstSongs_DoubleClick(sender As System.Object, e As System.EventArgs) Handles lstSongs.DoubleClick Player.currentPlaylist.appendItem(Player.newMedia(lstSongs.SelectedItem)) End Sub Private Sub cmdPlay_Click(sender As System.Object, e As System.EventArgs) Handles cmdPlay.Click Player.controls.play() End Sub
What I'd like to do is see the actual playlist in another Listbox, so if you double click on the songs Listbox to add to the playlist the other Listbox will be update accordingly.
Now for the slight twist.... How can remove the song that has just been played from the playlist?
Any thoughts, ideas or pointers will be appreciated.
Thanks & Regards




Reply With Quote