2006-05-29 09:32:27最愛五月天的櫻桃

FI7

Private Sub Command1_Click()
Timer1.Enabled = True
End Sub

Private Sub Command2_Click()
Image1.Left = 240
Image2.Left = 240
End Sub

Private Sub Timer1_Timer()
Randomize
Dim a As Image
a = Int(Rnd * 2) + 1
If a = 1 Then Image1.Left = Image1.Left + 100
If a = 2 Then Image2.Left = Image2.Left + 100
If Image1.Left >= 3240 Then
MsgBox ("灰機贏")
Timer1.Enabled = False
End If
If Image2.Left >= 3240 Then
MsgBox ("紅機贏")
Timer1.Enabled = False
End If
End Sub