VERSION 5.00
Object = "{0D452EE1-E08F-101A-852E-02608C4D0BB4}#2.0#0"; "FM20.DLL"
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.1#0"; "MSCOMCTL.OCX"
Begin VB.Form frm_progress 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "Dialog Caption"
   ClientHeight    =   1065
   ClientLeft      =   2760
   ClientTop       =   3750
   ClientWidth     =   9000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   1065
   ScaleWidth      =   9000
   ShowInTaskbar   =   0   'False
   Begin MSComctlLib.ProgressBar progressbar 
      Height          =   255
      Left            =   240
      TabIndex        =   0
      Top             =   600
      Width           =   8655
      _ExtentX        =   15266
      _ExtentY        =   450
      _Version        =   393216
      Appearance      =   1
   End
   Begin MSForms.Label lbl_Progress 
      Height          =   255
      Left            =   240
      TabIndex        =   1
      Top             =   120
      Width           =   8535
      Size            =   "15055;450"
      FontHeight      =   165
      FontCharSet     =   0
      FontPitchAndFamily=   2
   End
End
Attribute VB_Name = "frm_progress"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Const SEP = "®©"
Private Const C_SEP As String = "@@"
Private Const SEP1 As String = "®"
Private Const SEP2 As String = "©"

Public Property Let Title(ByVal as_title As String)
On Error GoTo ErrorHandler

  Me.Caption = as_title
  
  Exit Property
ErrorHandler:
  Call ErrorHandler("Title.Let")
End Property

Public Property Let Label(ByVal as_label As String)
On Error GoTo ErrorHandler

  lbl_Progress.Caption = as_label
  Exit Property
ErrorHandler:
  Call ErrorHandler("Label.Let")
End Property

Public Property Let Range(ByVal al_range As Long)
On Error GoTo ErrorHandler

  progressbar.Max = al_range
  
  Exit Property
ErrorHandler:
  Call ErrorHandler("Range.Let")
End Property

Public Function Reset()
On Error GoTo ErrorHandler

  progressbar.Value = 0
  Exit Function
  
ErrorHandler:
  Call ErrorHandler("Reset")
End Function

Public Function Step()
On Error GoTo ErrorHandler

  progressbar.Value = progressbar.Value + 1
  DoEvents
  Exit Function
  
ErrorHandler:
  Call ErrorHandler("Step")
End Function

' Standard error handler
Private Sub ErrorHandler(ByVal as_Fct As String)
  
    Call Err.Raise(Err.Number, Me.Name & "." & as_Fct & SEP1 & Err.Source, Err.Description)
End Sub

