qadeer37
Well-known member
I have added two checkbox controls chkBox1 and chkBox2.
What I want to do is that when both the chkbox are same meaning checked or unchecked the label should be On and if both are not same label should be Off.
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'and plz tell why this method is not working?
If chkBox1.Equals(chkBox2) Then
lblState.Text = "On"
Else
lblState.Text = "Off"
End If
End Sub
What I want to do is that when both the chkbox are same meaning checked or unchecked the label should be On and if both are not same label should be Off.
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'and plz tell why this method is not working?
If chkBox1.Equals(chkBox2) Then
lblState.Text = "On"
Else
lblState.Text = "Off"
End If
End Sub