Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim intcount As Integer
For intcount = 1 To 9
ListBox1.Items.Add(intcount.ToString)
Next
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
clearlist()
For Each strflder As String In My.Computer.FileSystem.GetDirectories("c:/")
ListBox1.Items.Add(strflder)
Next
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Dim objrandom As New Random
Dim intrandomNumber As Integer = 0
clearlist()
Do Until intrandomNumber = 10
intrandomNumber = objrandom.Next(25)
ListBox1.Items.Add(intrandomNumber.tostring)
Loop
End Sub
End Class