计时器和调用将是处理此问题的好方法:
Private WithEvents m_tmrGame As New System.Timers.Timer(1000)
Private m_intShouldBeAnEnum As Integer = 1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
m_tmrGame.Start()
End Sub
Private Sub m_tmrGame_Elapsed(ByVal sender As Object, ByVal e As System.Timers.ElapsedEventArgs) Handles m_tmrGame.Elapsed
Dim strCurrentObject As String = String.Empty
Select Case m_intShouldBeAnEnum
Case 1
strCurrentObject = "Rock"
m_intShouldBeAnEnum = 2
Case 2
strCurrentObject = "Paper"
m_intShouldBeAnEnum = 3
Case 3
strCurrentObject = "Scissors"
m_intShouldBeAnEnum = 4
Case 4
strCurrentObject = "Shoot!"
m_intShouldBeAnEnum = 1
m_tmrGame.Stop()
End Select
lblCountdown.Invoke(Sub(lblTarget As Label) lblTarget.Text = strCurrentObject, New Object() {lblCountdown})
End Sub