2 Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.ocx"
\r
3 Begin VB.Form ShowProgress
\r
4 BorderStyle = 1 'Fixed Single
\r
5 Caption = "Looking for Files"
\r
10 ControlBox = 0 'False
\r
12 MaxButton = 0 'False
\r
13 MinButton = 0 'False
\r
16 ShowInTaskbar = 0 'False
\r
18 Begin MSComctlLib.ProgressBar ScanProgress
\r
29 Begin VB.CommandButton AbortScan
\r
32 CausesValidation= 0 'False
\r
39 Begin VB.Label Label6
\r
47 Begin VB.Label Label5
\r
55 Begin VB.Label Label4
\r
63 Begin VB.Label Label3
\r
71 Begin VB.Label Label2
\r
79 Begin VB.Label Label1
\r
88 Attribute VB_Name = "ShowProgress"
\r
89 Attribute VB_GlobalNameSpace = False
\r
90 Attribute VB_Creatable = False
\r
91 Attribute VB_PredeclaredId = True
\r
92 Attribute VB_Exposed = False
\r
95 Private Declare Function GetTickCount Lib "kernel32" () As Long
\r
97 Private Const C_MIN_WAIT_TIME As Long = 0
\r
98 Private Const C_MIN_UPDATE_TIME As Long = 100
\r
100 Private g_SP_StartTime As Long
\r
101 Private g_SP_LastUpdate As Long
\r
103 Public g_SP_Abort As Boolean
\r
104 Public g_SP_AllowOtherDLG As Boolean
\r
106 Public Sub SP_Init(maxIndex As Long)
\r
108 g_SP_AllowOtherDLG = False
\r
109 g_SP_StartTime = GetTickCount()
\r
110 g_SP_LastUpdate = g_SP_StartTime
\r
112 ShowProgress.Visible = False
\r
113 ShowProgress.Caption = GetResString(PROGRESS_CAPTION)
\r
115 Label3.Caption = GetResString(PROGRESS_PATH_LABEL)
\r
116 Label4.Caption = GetResString(PROGRESS_FILE_LABEL)
\r
117 Label5.Caption = GetResString(PROGRESS_INFO_LABEL)
\r
118 ScanProgress.Max = maxIndex
\r
120 ShowProgress.Top = frmWizard.Top + 3200
\r
121 ShowProgress.Left = frmWizard.Left + 500
\r
124 Public Sub SP_UpdateProgress(curObject As String, curParent As String, _
\r
127 Dim currTicks As Long
\r
128 currTicks = GetTickCount()
\r
130 ScanProgress.value = curIndex
\r
132 If (Not ShowProgress.Visible) Then
\r
133 If (currTicks - g_SP_StartTime > C_MIN_WAIT_TIME) Then
\r
134 ShowProgress.Visible = True
\r
137 If (currTicks - g_SP_LastUpdate > C_MIN_UPDATE_TIME) Then
\r
138 g_SP_LastUpdate = currTicks
\r
139 Label1.Caption = curParent
\r
140 Label2.Caption = curObject
\r
141 Label6.Caption = "(" & str$(curIndex) & "/" & str$(ScanProgress.Max) & ")"
\r
145 Private Sub AbortScan_Click()
\r
147 Label5.Caption = GetResString(PROGRESS_WAIT_LABEL)
\r
148 AbortScan.Caption = GetResString(PROGRESS_ABORTING)
\r
149 AbortScan.Enabled = False
\r
152 Private Sub Form_Deactivate()
\r
153 If Not g_SP_AllowOtherDLG Then
\r
154 ShowProgress.ZOrder (0)
\r