Home > Software engineering >  Rookie white light for a very simple problem
Rookie white light for a very simple problem

Time:09-28

In judging check controls selected to convert the background color of the experiment in
Private Sub CheckBox1_CheckStateChanged (sender As Object, As EventArgs e) Handles CheckBox1. CheckStateChanged
If CheckBox1. CheckState. Value__=0 Then
Me. BackColor=Color. Violet
ElseIf CheckBox1. CheckState. Value__=1 Then
Me. BackColor=Color. Black
End the If
End Sub
Above statement can achieve but can't achieve the following statements can only display the first selected purple
If CheckBox1. CheckState. Checked=1 Then
Me. BackColor=Color. Violet
The Else CheckBox1. CheckState. Checked=0 Then
Me. BackColor=Color. Blue
End the If
The state of the check box can't use CheckState. Checked=to assign a value? Since the CheckState. Checked=1 said why can't use 0 means not selected?
Why the CheckState. Value__=0 can be done? And want to use two underlined
Consult your rookie points less

CodePudding user response:

The Else CheckBox1. CheckState. Checked=0 Then=& gt; ElseIf CheckBox1. The CheckState. Checked=0 Then

  • Related