Hello,
small example. Hope, it helps you.
Public Class Form1
Dim tips() As String
Const NO_OF_TIPS As Int32 = 15
Private Sub Form1_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
' Setup tips (may be loaded from file in future)
ReDim tips(NO_OF_TIPS - 1)
For tip As Int32 = 0 To NO_OF_TIPS - 1
tips(tip) = "Tip no. " & tip.ToString
Next tip
Randomize()
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
'Show a tip
Dim randomTip As Int32 = CInt(Rnd() * NO_OF_TIPS)
MsgBox(tips(randomTip))
End Sub
End Class
Greetings, Lars
"Laserson" <la******@yandex.ruschrieb im Newsbeitrag
news:OA**************@TK2MSFTNGP04.phx.gbl...
Hi! How to create an application that can show strings in a random order?
I tried to create an array of string and then use Randomize() method by
all my strings were shown one by one...