Dim aNum As Integer = 0
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
Label1.Text = "Timer: " & aNum
aNum += 1
If aNum = 20 Then
Timer1.Stop()
MsgBox("timer stopped")
Else
MsgBox("not stopped")
End If
End Sub
我试图做,如果aNum = 20然后做点什么。但问题是当计时器启动然后Else语句开始工作,直到计时器没有在aNum = 20停止。问题是什么?