我写一个小游戏但是有一段代码老是错误检查半天也没结果
Private Sub startcommand_Click()
Timer1.Enabled = True
Timer2.Enabled = True
Timer3.Enabled = True
'使三个定时器可用
stopcommand1.Enabled = True
stopcommand2.Enabled = True
stopcommand3.Enabled = True
'使三个停止按扭可用
startcommand.Caption = Format(Int(1000 * Rnd), "000")
End Sub
Private Sub Timer1_Timer()
Dim i As Integer, j As Integer, k As Integer
numberlabe11.Caption = i '在标签中显示
If i = 9 Then
i = 0
Else: i = i + 1
End If 'i自动加一或回零
End Sub
Private Sub Timer2_Timer()
numberlabe12.Caption = j '在标签中显示数字
If j = 9 Then
j = 0
Else: j = j + 1 '自动加一或回零
End If
End Sub
Private Sub Timer3_Timer()
NumberLabel3.Caption = k '在标签中显示数字
If k = 9 Then
k = 0
Else: k = k + l 'k自动加一或回零
End If
End Sub
谢谢~~~~~~
[此贴子已经被作者于2007-3-8 21:21:08编辑过]