M
Meissa
Hi,
I am trying to hide a button on a windows form if the value of a label
is either 2 or 4
I am struggling here and would appreciate any help you could give me
please.
I have tried:
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button2.Click
Dim MyValue As Integer
Randomize() ' Initialize random-number generator.
MyValue = CInt(Int((6 * Rnd()) + 1)) ' Generate random value
between 1 and 6.
Label2.Text = MyValue
If Label1.Text =(2,4) Then
Button1.Visible = True
Else : Button1.Visible = False
End If
End Sub
Could some kind soul show me the error of my ways please.
TIA
I am trying to hide a button on a windows form if the value of a label
is either 2 or 4
I am struggling here and would appreciate any help you could give me
please.
I have tried:
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button2.Click
Dim MyValue As Integer
Randomize() ' Initialize random-number generator.
MyValue = CInt(Int((6 * Rnd()) + 1)) ' Generate random value
between 1 and 6.
Label2.Text = MyValue
If Label1.Text =(2,4) Then
Button1.Visible = True
Else : Button1.Visible = False
End If
End Sub
Could some kind soul show me the error of my ways please.
TIA