Mp3 Player With ListBox Using Windows Media Player in C Sharp
Mp3 Player With ListBox Using Windows Media Player in C Sharp
As you can see below the windows media player is loaded in the toolbox
Drag the windows media player and just drop on the form and set the alignment of the
player
I will use a list box from the toolbox so I will drag and drop the listbox for choosing the list
of the mp3 files
Then I take a button from the toolbox for choosing those files so the text of the button I set
Brows
The button is using for choosing the playlist and the listbox will show the playlist of the
songs and when you select any one song from the listbox it should play in the windows
media player.
Then I take a openFileDialog from the toolbox and drag on the form it will be added below
the form for selecting files on Brows button click
First of all, declare two global variables which are a string array type
Code Explanation:
openFileDialog1.Multiselect = true;
This code is used for the multiple files section
}
Then double click on listbox and paste the below code
so write the above one-line code and this one-line code what is doing is it’s whatever file or
whatever name you will choose in your list box it will copy that list or the path of that file
into your window media player.