'create playlist Dim newPlayList As WMPLib.IWMPPlaylist = wmpControl.playlistCollection.newPlaylist("soundsToPlay") newPlayList.appendItem(wmpControl.newMedia("C:\Sample1.mp3")) newPlayList.appendItem(wmpControl.newMedia("C:\Sample2.mp3")) 'play the list wmpControl.Visible = False wmpControl.currentPlaylist = newPlayList wmpControl.stretchToFit = True wmpControl.Ctlcontrols.play()
I think this is one of the most important info for me.
And i’m glad reading your article. But should remark on few general things, The site style is great, the articles is really excellent : D. Good job, cheers
LikeLike
hi
pretty nice your code, really helpfull!!! thanks!!
I got some question:
1. It is posible to see the playlist ? like in the “normal” media player ? If it is possible, how to do it by code???
thnks!!!!
LikeLike
You could get the contents of the playlist using the below and display any way you wish:
Dim i As Integer = 0
For i = 0 To wmpControl.currentPlaylist.count - 1
Dim pListItem As WMPLib.IWMPMedia = wmpControl.currentPlaylist.Item(i)
'do something with the playlist item (add to a list or panel)
Debug.WriteLine(pListItem.name)
Next
LikeLike
help me with the interface so that i get the concept very well
LikeLike
thanks it is very helpfull to me
LikeLike
tq..i’m glad to read this article after many trial i had try..and this code usefull for me. i just change a little because the video not appear..this is the code..
‘create playlist
Dim newPlayList As WMPLib.IWMPPlaylist = AxWindowsMediaPlayer1.playlistCollection.newPlaylist(“soundsToPlay”)
newPlayList.appendItem(AxWindowsMediaPlayer1.newMedia(“C:\Sample1.mp3”))
newPlayList.appendItem(AxWindowsMediaPlayer1.newMedia(“C:\Sample2.mp3”))
‘play the list
AxWindowsMediaPlayer1.Visible = True
AxWindowsMediaPlayer1.currentPlaylist = newPlayList
AxWindowsMediaPlayer1.stretchToFit = True
LikeLike
Thanks!
LikeLike
great
LikeLike
Here is a link to a complete Playlist Creator Program that I just made. It does *.m3u, and *.wpl playlists. https://1drv.ms/u/s!AqFWJpjpd8nPiUnu1wVcNVTQOMGZ Hope you Enjoy It. Needs framework 4.5 and Windows 10 with WMP version 12.0.10011.16384
LikeLike