帮忙啊 Sub过程的作用
Dim start, finish, money As IntegerPrivate Sub Command1_Click()
If Option1(0).Value = False And Option1(1).Value = False And Option1(2).Value = False And Option1(3).Value = False Then
MsgBox "请选择选手", , "信息提示"
Else
For i = 0 To 3
If Option1(i).Value = True Then
Exit For
Else
If i = 3 Then
Exit Sub
End If
End If
Next i
money = money - 20
Label2.Caption = money
Command1.Enabled = False
Do
no = Int(Rnd * 4)
wit = Int(Rnd * 21) + 23
Image1(no).Move Image1(no).Left + wit, Image1(no).Top
pause (0.03)
Loop Until Image1(no).Left + Image1(no).Width > finish
If Option1(no).Value = True Then
MsgBox Option1(no).Caption + "赢了!"
money = money + 60
Label2.Caption = money
Else
MsgBox "你输了!"
End If
If money = 0 Then
MsgBox "你已经没赌注了!"
Else
Command1.Enabled = True
End If
For i = 0 To 3
Option1(i).Value = False
Image1(i).Left = start
Next i
End If
End Sub
Private Sub Command2_Click()
End
End Sub
Private Sub Form_Load()
Randomize Timer
start = Image1(0).Left
finish = 6000
money = 100
Label2.Caption = money
End Sub
Sub pause(x)
w = Timer
Do While Timer - w <= m
wait = DoEvents
Loop
End Sub
这个过程什么意思啊,具体点,谢谢
Sub pause(x)
w = Timer
Do While Timer - w <= m
wait = DoEvents
Loop
End Sub