Hello All,
I am new to VB and I am trying to accomplish a simple task. I want to run through a loop that will generate a random number. After the termination of the loop I want the button to longer be visble. Right now with the code I have if you click the button once, the button disappears. When I debug everything looks fine. Please help. Below is my code.
Code:
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim i As Integer
For i = 1 To 3
Form1_Load(sender, e)
Next
Button1.Visible = False
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim value As Integer
value = (Int(Rnd() * 10))
Label1.Text = value
End Sub
End Class