Creating a Playlist for WindowsMediaPlayer Control

  • Thread starter Thread starter thomasc
  • Start date Start date
T

thomasc

Hello,

This question is about VB.NET2003.

I have a WindowsMediaPlayer Control on a windows form.
Now I want to create a playlist for the control so it plays
all the media files specified in the playlist. But I haven't
been able to how to create a playlist and make my WindowsMediaPlayer
Control play it.

The media files to be played are all in the same folder in my hard
drive.

Pleae let me know how I can do this operation.
Thanks much in advance for your cooperation.

Regards,
 
Hello,

This question is about VB.NET2003.

I have a WindowsMediaPlayer Control on a windows form.
Now I want to create a playlist for the control so it plays
all the media files specified in the playlist. But I haven't
been able to how to create a playlist and make my WindowsMediaPlayer
Control play it.

The media files to be played are all in the same folder in my hard
drive.

Pleae let me know how I can do this operation.
Thanks much in advance for your cooperation.

Regards,

IMHO, WMP control is not perfect for playlists, you can create your
own, but it'll take too time to accomplish the similiar to WMP's built-
in one.

To manipulate WMP's built-in playlist you can create a simple playlist
into WMP control's memory using this code, then press play button on
WMP's UI (don't set UI mode to "none" if you'll use WMP's playlist
feature):

Dim song = AxWindowsMediaPlayer1.newMedia(<song_path>)
AxWindowsMediaPlayer1.currentPlaylist.appendItem(song)

You can build the list by adding more items.

Hope this helps.
 
Back
Top