1VERSION 5.00
2Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.ocx"
3Begin VB.Form ShowProgress
4   BorderStyle     =   1  'Fixed Single
5   Caption         =   "Looking for Files"
6   ClientHeight    =   2160
7   ClientLeft      =   2505
8   ClientTop       =   2325
9   ClientWidth     =   7110
10   ControlBox      =   0   'False
11   LinkTopic       =   "Form1"
12   MaxButton       =   0   'False
13   MinButton       =   0   'False
14   ScaleHeight     =   2160
15   ScaleWidth      =   7110
16   ShowInTaskbar   =   0   'False
17   Visible         =   0   'False
18   Begin MSComctlLib.ProgressBar ScanProgress
19      Height          =   255
20      Left            =   120
21      TabIndex        =   2
22      Top             =   1400
23      Width           =   5500
24      _ExtentX        =   9710
25      _ExtentY        =   450
26      _Version        =   393216
27      Appearance      =   1
28   End
29   Begin VB.CommandButton AbortScan
30      Cancel          =   -1  'True
31      Caption         =   "Cancel"
32      CausesValidation=   0   'False
33      Height          =   375
34      Left            =   2880
35      TabIndex        =   1
36      Top             =   1760
37      Width           =   1455
38   End
39   Begin VB.Label Label6
40      Caption         =   "X / Y"
41      Height          =   195
42      Left            =   5760
43      TabIndex        =   7
44      Top             =   1430
45      Width           =   1200
46   End
47   Begin VB.Label Label5
48      Caption         =   "Label5"
49      Height          =   440
50      Left            =   120
51      TabIndex        =   6
52      Top             =   120
53      Width           =   6870
54   End
55   Begin VB.Label Label4
56      Caption         =   "Label4"
57      Height          =   195
58      Left            =   120
59      TabIndex        =   5
60      Top             =   995
61      Width           =   1155
62   End
63   Begin VB.Label Label3
64      Caption         =   "Label3"
65      Height          =   195
66      Left            =   120
67      TabIndex        =   4
68      Top             =   680
69      Width           =   1155
70   End
71   Begin VB.Label Label2
72      Caption         =   "Label2"
73      Height          =   195
74      Left            =   1395
75      TabIndex        =   3
76      Top             =   995
77      Width           =   5595
78   End
79   Begin VB.Label Label1
80      Caption         =   "Label1"
81      Height          =   195
82      Left            =   1395
83      TabIndex        =   0
84      Top             =   680
85      Width           =   5595
86   End
87End
88Attribute VB_Name = "ShowProgress"
89Attribute VB_GlobalNameSpace = False
90Attribute VB_Creatable = False
91Attribute VB_PredeclaredId = True
92Attribute VB_Exposed = False
93Option Explicit
94
95Private Declare Function GetTickCount Lib "kernel32" () As Long
96
97Private Const C_MIN_WAIT_TIME   As Long = 0
98Private Const C_MIN_UPDATE_TIME As Long = 100
99
100Private g_SP_StartTime As Long
101Private g_SP_LastUpdate As Long
102
103Public g_SP_Abort As Boolean
104Public g_SP_AllowOtherDLG As Boolean
105
106Public Sub SP_Init(maxIndex As Long)
107    g_SP_Abort = False
108    g_SP_AllowOtherDLG = False
109    g_SP_StartTime = GetTickCount()
110    g_SP_LastUpdate = g_SP_StartTime
111
112    ShowProgress.Visible = False
113    ShowProgress.Caption = GetResString(PROGRESS_CAPTION)
114
115    Label3.Caption = GetResString(PROGRESS_PATH_LABEL)
116    Label4.Caption = GetResString(PROGRESS_FILE_LABEL)
117    Label5.Caption = GetResString(PROGRESS_INFO_LABEL)
118    ScanProgress.Max = maxIndex
119
120    ShowProgress.Top = frmWizard.Top + 3200
121    ShowProgress.Left = frmWizard.Left + 500
122End Sub
123
124Public Sub SP_UpdateProgress(curObject As String, curParent As String, _
125                             curIndex As Long)
126
127    Dim currTicks As Long
128    currTicks = GetTickCount()
129
130    ScanProgress.value = curIndex
131
132    If (Not ShowProgress.Visible) Then
133        If (currTicks - g_SP_StartTime > C_MIN_WAIT_TIME) Then
134            ShowProgress.Visible = True
135        End If
136    End If
137    If (currTicks - g_SP_LastUpdate > C_MIN_UPDATE_TIME) Then
138        g_SP_LastUpdate = currTicks
139        Label1.Caption = curParent
140        Label2.Caption = curObject
141        Label6.Caption = "(" & str$(curIndex) & "/" & str$(ScanProgress.Max) & ")"
142    End If
143End Sub
144
145Private Sub AbortScan_Click()
146    g_SP_Abort = True
147    Label5.Caption = GetResString(PROGRESS_WAIT_LABEL)
148    AbortScan.Caption = GetResString(PROGRESS_ABORTING)
149    AbortScan.Enabled = False
150End Sub
151
152Private Sub Form_Deactivate()
153    If Not g_SP_AllowOtherDLG Then
154        ShowProgress.ZOrder (0)
155    End If
156End Sub
157
158