Creating a Playlist for WindowsMediaPlayer Control

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,
 
K

kimiraikkonen

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top