Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27349

VS 2012 How to randomize WindowsMediaPlayer playlist ?

$
0
0
I need a code to randomize songs in my playlist. My playlist is displayed in the ListBox.
I use this code, but he doesn't mixes songs, he mixes items in ListBox.
CODE:
HTML Code:

  Dim count As Integer = Me.ListBox1.Items.Count
                    Dim item As Object
                    For index As Integer = 0 To count - 2 Step 1
                        item = Me.ListBox1.Items(Me.randomiser.Next(index, count))
                        Me.ListBox1.Items.Remove(item)
                        Me.ListBox1.Items.Insert(index, item)
                    Next index


Viewing all articles
Browse latest Browse all 27349

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>