菜鸟求助数字游戏的问题
我想让四个数字分别1秒加一次,可是这代码写好后四个数字隔一秒不是+1而是+好多。。。。。4个intervel属性为1000,求助大虾们怎么改下代码
Dim i As Integer, number As Integer
Private Sub Command1_Click()
Command2.Enabled = True
Command3.Enabled = True
Command4.Enabled = True
Command5.Enabled = True
Timer1.Enabled = True
Timer2.Enabled = True
Timer3.Enabled = True
Timer4.Enabled = True
Command1.Caption = Format(Int(Rnd * 10000), "0000")
Command1.Enabled = False
End Sub
Private Sub Command2_Click()
Timer1.Enabled = False
If Not (Timer1.Enabled Or Timer2.Enabled Or Timer3.Enabled Or Timer4.Enabled) Then
number = Label1.Caption * 1000 + Label2.Caption * 100 + Label3.Caption * 10 + Label4.Caption
If Command1.Caption = number Then
MsgBox "你真强"
End If
Command1.Caption = "开始"
Command1.Enabled = True
End If
End Sub
Private Sub Command3_Click()
Timer2.Enabled = False
If Not (Timer1.Enabled Or Timer2.Enabled Or Timer3.Enabled Or Timer4.Enabled) Then
number = Label1.Caption * 1000 + Label2.Caption * 100 + Label3.Caption * 10 + Label4.Caption
If Command1.Caption = number Then
MsgBox "你真强"
End If
Command1.Caption = "开始"
Command1.Enabled = True
End If
End Sub
Private Sub Command4_Click()
Timer3.Enabled = False
If Not (Timer1.Enabled Or Timer2.Enabled Or Timer3.Enabled Or Timer4.Enabled) Then
number = Label1.Caption * 1000 + Label2.Caption * 100 + Label3.Caption * 10 + Label4.Caption
If Command1.Caption = number Then
MsgBox "你真强"
End If
Command1.Caption = "开始"
Command1.Enabled = True
End If
End Sub
Private Sub Command5_Click()
Timer4.Enabled = False
If Not (Timer1.Enabled Or Timer2.Enabled Or Timer3.Enabled Or Timer4.Enabled) Then
number = Label1.Caption * 1000 + Label2.Caption * 100 + Label3.Caption * 10 + Label4.Caption
If Command1.Caption = number Then
MsgBox "你真强"
End If
Command1.Caption = "开始"
Command1.Enabled = True
End If
End Sub
Private Sub Timer1_Timer()
Label1.Caption = i
If i = 9 Then
i = 0
Else
i = i + 1
End If
End Sub
Private Sub Timer2_Timer()
Label2.Caption = i
If i = 9 Then
i = 0
Else
i = i + 1
End If
End Sub
Private Sub Timer3_Timer()
Label3.Caption = i
If i = 9 Then
i = 0
Else
i = i + 1
End If
End Sub
Private Sub Timer4_Timer()
Label4.Caption = i
If i = 9 Then
i = 0
Else
i = i + 1
End If
End Sub