Windows Media Player Playlist bound to Listbox

C

CSharp-Jay

So I am not a new or a pro programmer, merely delving into new
concepts. For my current project I am creating a program that acts as
a wrapper for Windows Media Player, so I can get my own functionality
out of a program that contains little of what I prefer. So the
program is basically an mp3 player to put it bluntly. I just finished
setting up the program for the user to select multiple files to add to
the current playlist. However, since WMP is hidden on my program they
cannot see them, so I need to bind the playlist to a listbox control.
So let us say they double click an item in the listbox, it plays that
song, or when a track ends and moves on to the next track, the
selected item in the listbox moves to the next item in the list.
Problem is I have no idea how to get this functionality out of it, and
google searches are turning up nothing helpful. Anybody have an idea?
 
R

Rick Lones

CSharp-Jay said:
So I am not a new or a pro programmer, merely delving into new
concepts. For my current project I am creating a program that acts as
a wrapper for Windows Media Player, so I can get my own functionality
out of a program that contains little of what I prefer. So the
program is basically an mp3 player to put it bluntly. I just finished
setting up the program for the user to select multiple files to add to
the current playlist. However, since WMP is hidden on my program they
cannot see them, so I need to bind the playlist to a listbox control.
So let us say they double click an item in the listbox, it plays that
song, or when a track ends and moves on to the next track, the
selected item in the listbox moves to the next item in the list.
Problem is I have no idea how to get this functionality out of it, and
google searches are turning up nothing helpful. Anybody have an idea?

Well, either you can start WMP with a command line that specifies a file to play
or you can't. I've not tried, but would think that you could. That's not
"binding" anything to the player of course, but it would sort of have the effect
you seem to be after.

However, I would think that it's much less likely that there is any WMP
interface by which an external program can be informed that "a track ends". If
you can start WMP with a single .mp3 file then you can probably also start it
with a .wpl file, which is a playlist. The issue there is whether the .wpl file
format is published somewhere in enough detail for you to be able to create one
on the fly from your app. But as for getting feedback the other way from WMP to
your application, I am very doubtful that any such mechanism would exist.

Disclaimer: This is just "off the top of the head" stuff, I've never looked
into any of it, but . . .

HTH,
-rick-
 

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