how to bind data to list box.
or how to play a song from a location using a listbox havin the itemname and button to play the selected item

Recommended Answers

All 6 Replies

To play sound:
Process.Start(ListBox1.SelectedItem.ToString)

thank u dear friend

what to place in the list box the location of the sound file or what?

The path and the name of the file
c:\sounds\ok.wav

if i want only the name of the sound to be placed in the listbox but should play it from the location what should i do

If you only want the name in the listbox then you will have to keep the path somewhere else you can reference otherwise the program cannot find the song if it dosen't know where it is.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.