Access the answers to your technology questions today.
Subscribe Now
30-day free trial. Register in 60 seconds.
What Makes Experts Exchange Unique?
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.
Try it out and discover for yourself.
Subscribe Now
30-day free trial. Register in 60 seconds.
Join the Community
Give a Little. Get a Lot.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Join the Community
by: WorkingJourneymanPosted on 2005-09-23 at 09:15:29ID: 14945615
This MSDN article has info on how to make WMP play a track using VB.Net... library/de fault.asp? url=/libra ry/ en-us/w mplay10/mm p_sdk/ embe ddingthepl ayercontro linavisual basicnetso lution.asp
http://msdn.microsoft.com/
So all that remains is to select a random song from the list. Such code might look something like...
Dim random As New Random
Dim song_index As Integer
song_index = random.Next( ListBox1.Items.Count )
AxWindowsMediaPlayer1.URL = SongFolder + "\" + ListBox1.Items( song_index )