好吧,我一直在這一整天工作..我卡住了。我是否錯過了一些不會讓我強制使用隨機函數來確保它在循環列表之前再次通過列表的問題?問題是它有時會連續顯示相同的項目。所以我的目標是獲得一個「itunes」功能,它可以確保什麼時候洗牌,它不會擊中已經「顯示」的項目。隨機文本列表問題
我當前的代碼:
Dim rng As New System.Random()
Dim RAND(16) As String
RAND(0) = "A"
RAND(1) = "B"
RAND(2) = "C"
RAND(3) = "D"
RAND(4) = "E"
RAND(5) = "F"
RAND(6) = "G"
RAND(7) = "H"
RAND(8) = "I"
RAND(9) = "J"
RAND(10) = "K"
RAND(11) = "L"
RAND(12) = "M"
RAND(13) = "N"
RAND(14) = "O"
RAND(15) = "P"
RAND(16) = "Q"
If TextBox1.Text = 'Current Text
Then
TextBox1.Text = ("""" & RAND(rng.Next(RAND.Count())) & """")
End If