VERSION 5.00
Begin VB.Form ProgressBar1 
   Caption         =   "Progress Bar Demo 1"
   ClientHeight    =   495
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4860
   LinkTopic       =   "Form1"
   ScaleHeight     =   495
   ScaleWidth      =   4860
   StartUpPosition =   3  'Windows Default
   Begin VB.Timer Timer1 
      Interval        =   10
      Left            =   0
      Top             =   0
   End
   Begin VB.PictureBox outerBox 
      BackColor       =   &H00FFFFFF&
      Height          =   275
      Left            =   383
      ScaleHeight     =   210
      ScaleWidth      =   4035
      TabIndex        =   0
      Top             =   110
      Width           =   4095
      Begin VB.PictureBox innerBox 
         BackColor       =   &H00FFC0C0&
         BorderStyle     =   0  'None
         Height          =   275
         Left            =   0
         ScaleHeight     =   270
         ScaleWidth      =   15
         TabIndex        =   1
         Top             =   0
         Width           =   15
      End
   End
End
Attribute VB_Name = "ProgressBar1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

''
'' By Jamie Plenderleith
'' plenderj@tcd.ie
''

Private Const timeAllowed As Long = 10000  '' milliseconds
Private timeElapsed As Long

Private Sub Form_Load()
    Timer1.Enabled = True
End Sub

Private Sub Timer1_Timer()
    If timeElapsed = timeAllowed Then
        MsgBox "Time's up!", vbCritical
        End
    End If
    timeElapsed = timeElapsed + 10
    innerBox.Width = outerBox.Width * (timeElapsed / timeAllowed)
End Sub
