VERSION 5.00
Begin VB.Form frmMain 
   Caption         =   "Form1"
   ClientHeight    =   4635
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   8940
   LinkTopic       =   "Form1"
   ScaleHeight     =   4889.24
   ScaleMode       =   0  'User
   ScaleWidth      =   8940
   StartUpPosition =   3  'Windows Default
   Begin VB.TextBox Text3 
      Alignment       =   1  'Right Justify
      Height          =   285
      Left            =   7800
      TabIndex        =   5
      Text            =   "0"
      Top             =   4200
      Width           =   855
   End
   Begin VB.TextBox Text2 
      Alignment       =   1  'Right Justify
      Height          =   285
      Left            =   7800
      TabIndex        =   3
      Text            =   "0"
      Top             =   3840
      Width           =   855
   End
   Begin VB.TextBox Text1 
      Alignment       =   1  'Right Justify
      Height          =   285
      Left            =   7800
      TabIndex        =   2
      Text            =   "0"
      Top             =   3480
      Width           =   855
   End
   Begin VB.Timer Timer1 
      Interval        =   1
      Left            =   6480
      Top             =   1200
   End
   Begin VB.Shape Shape1 
      Height          =   3135
      Left            =   0
      Top             =   0
      Width           =   3975
   End
   Begin VB.Label Label3 
      Caption         =   "Time"
      Height          =   255
      Left            =   7080
      TabIndex        =   4
      Top             =   4200
      Width           =   615
   End
   Begin VB.Label Label2 
      Caption         =   "Image Top Co-ordinate"
      Height          =   255
      Left            =   6000
      TabIndex        =   1
      Top             =   3840
      Width           =   1695
   End
   Begin VB.Label Label1 
      Caption         =   "Image Left Co-ordinate"
      Height          =   255
      Left            =   6120
      TabIndex        =   0
      Top             =   3480
      Width           =   1695
   End
   Begin VB.Image ece480Img 
      Height          =   255
      Left            =   2400
      Picture         =   "frmMain.frx":0000
      Top             =   1320
      Visible         =   0   'False
      Width           =   990
   End
End
Attribute VB_Name = "frmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Timer1_Timer()
Static count As Integer
Static state As Integer
If count = 0 Then
ece480Img.Left = 0
ece480Img.Top = 1501
End If
Dim horiUpLimit As Integer
Dim vertiUpLimit As Integer
Dim horiLowLimit As Integer
Dim vertiLowLimit As Integer
Dim horiIncrement As Integer
Dim vertiIncrement As Integer
horiUpLimit = 3000
vertiUpLimit = 3000
horiLowLimit = 50
vertiLowLimit = 50
vertiIncrement = 20
horiIncrement = 20
    ece480Img.Visible = True
Text1.Text = ece480Img.Left
Text2.Text = ece480Img.Top
Text3.Text = count / 100
    
    If state = 0 Then
        ece480Img.Left = ece480Img.Left + horiIncrement
        ece480Img.Top = ece480Img.Top + vertiIncrement
        If ece480Img.Top > vertiUpLimit Then
        state = 1
        End If
        If ece480Img.Left > horiUpLimit Then
        state = 3
        End If
    End If
    If state = 1 Then
        ece480Img.Left = ece480Img.Left + horiIncrement
        ece480Img.Top = ece480Img.Top - vertiIncrement
       If ece480Img.Left > horiUpLimit Then
       state = 2
       End If
       If ece480Img.Top < vertiLowLimit Then
       state = 0
       End If
    End If
       
    If state = 2 Then
        ece480Img.Top = ece480Img.Top - vertiIncrement
        ece480Img.Left = ece480Img.Left - horiIncrement
        If ece480Img.Top < vertiLowLimit Then
        state = 3
        End If
        If ece480Img.Left < horiLowLimit Then
        state = 1
        End If
    End If
    
    If state = 3 Then
        ece480Img.Top = ece480Img.Top + vertiIncrement
        ece480Img.Left = ece480Img.Left - horiIncrement
        If ece480Img.Left < horiLowLimit Then
        state = 0
        End If
        If ece480Img.Top > vertiUpLimit Then
        state = 2
        End If
    End If
count = count + 1
    If count > 1000 Then
    count = 0
    End If
End Sub
