它总是显示第一个条件。就像它点击了两次一样,我希望 a1 和 a2 可见,并且 label7 和 label8 以及很快......这是我的代码。任何帮助表示赞赏
Private Sub cmdLap_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdLap.Click
Dim a As Integer
a = a + 1
If a = 1 Then
a1.Visible = True
Label7.Text = Label1.Text & " hour(s) " & Label2.Text & " minute(s) " & Label3.Text & " second(s) "
ElseIf a = 2 Then
a2.Visible = True
Label8.Text = Label1.Text & " hour(s) " & Label2.Text & " minute(s) " & Label3.Text & " second(s) "
ElseIf a = 3 Then
a3.Visible = True
Label9.Text = Label1.Text & " hour(s) " & Label2.Text & " minute(s) " & Label3.Text & " second(s) "
End If
End Sub**