VERSION 5.00
Begin VB.Form Form2 
   BackColor       =   &H00FFFFFF&
   Caption         =   "TAXI"
   ClientHeight    =   3975
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   8100
   LinkTopic       =   "Form2"
   ScaleHeight     =   3975
   ScaleWidth      =   8100
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command1 
      BackColor       =   &H00FFFFFF&
      Caption         =   "TAXI"
      Height          =   495
      Left            =   360
      Style           =   1  'Graphical
      TabIndex        =   1
      Top             =   3360
      Width           =   735
   End
   Begin VB.Timer Timer3 
      Enabled         =   0   'False
      Interval        =   100
      Left            =   2520
      Top             =   7560
   End
   Begin VB.Timer Timer2 
      Enabled         =   0   'False
      Interval        =   100
      Left            =   1440
      Top             =   7560
   End
   Begin VB.Timer Timer1 
      Interval        =   100
      Left            =   480
      Top             =   7560
   End
   Begin VB.Image people 
      Height          =   480
      Left            =   2760
      Picture         =   "人与车.frx":0000
      Top             =   3120
      Width           =   480
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      BackColor       =   &H00FFFFFF&
      Height          =   180
      Left            =   2280
      TabIndex        =   0
      Top             =   2880
      Width           =   90
   End
   Begin VB.Image taxi 
      Height          =   1935
      Left            =   120
      Picture         =   "人与车.frx":0442
      Top             =   600
      Width           =   3015
   End
End
Attribute VB_Name = "Form2"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim h As Integer
Dim w As Integer

Dim st As Integer
Dim sp As Integer
Private Sub Command1_Click()
    If people.Left < taxi.Left + w Then st = 0 Else sp = 0
End Sub

Private Sub Form_Load()
    sp = 30
    st = 90
    h = 350
    w = 1200
End Sub

Private Sub Image2_Click()

End Sub

Private Sub Timer1_Timer()
   people.Left = people.Left + sp
   taxi.Left = taxi.Left + st
   If (st * sp = 0) And Abs(people.Left - (taxi.Left + w)) <= 30 Then
      people.Top = taxi.Top + h
      people.Left = taxi.Left + w
      st = 90
      sp = 90
   End If
End Sub



