1VERSION 5.00
2Begin VB.Form SearchDocs
3   BorderStyle     =   3  'Fixed Dialog
4   Caption         =   "Looking for Files"
5   ClientHeight    =   1830
6   ClientLeft      =   2505
7   ClientTop       =   2325
8   ClientWidth     =   7110
9   ControlBox      =   0   'False
10   LinkTopic       =   "Form1"
11   MaxButton       =   0   'False
12   MinButton       =   0   'False
13   ScaleHeight     =   1830
14   ScaleWidth      =   7110
15   ShowInTaskbar   =   0   'False
16   Visible         =   0   'False
17   Begin VB.CommandButton AbortScan
18      Cancel          =   -1  'True
19      Caption         =   "Cancel"
20      CausesValidation=   0   'False
21      Height          =   375
22      Left            =   2880
23      TabIndex        =   1
24      Top             =   1350
25      Width           =   1455
26   End
27   Begin VB.Label Label5
28      Caption         =   "Label5"
29      Height          =   440
30      Left            =   120
31      TabIndex        =   5
32      Top             =   120
33      Width           =   6870
34      WordWrap        =   -1  'True
35   End
36   Begin VB.Label Label4
37      Caption         =   "gefundene Dokumente:"
38      Height          =   195
39      Left            =   120
40      TabIndex        =   4
41      Top             =   960
42      Width           =   1800
43   End
44   Begin VB.Label Label3
45      Caption         =   "Pfad:"
46      Height          =   195
47      Left            =   120
48      TabIndex        =   3
49      Top             =   680
50      Width           =   1800
51   End
52   Begin VB.Label Label2
53      Caption         =   "Label2"
54      Height          =   195
55      Left            =   2040
56      TabIndex        =   2
57      Top             =   995
58      Width           =   5595
59   End
60   Begin VB.Label Label1
61      Caption         =   "Label1"
62      Height          =   195
63      Left            =   2040
64      TabIndex        =   0
65      Top             =   680
66      Width           =   5595
67   End
68End
69Attribute VB_Name = "SearchDocs"
70Attribute VB_GlobalNameSpace = False
71Attribute VB_Creatable = False
72Attribute VB_PredeclaredId = True
73Attribute VB_Exposed = False
74Option Explicit
75
76Private Declare Function GetTickCount Lib "kernel32" () As Long
77
78Private Const C_MIN_WAIT_TIME   As Long = 1000
79Private Const C_MIN_UPDATE_TIME As Long = 100
80
81Private g_SD_StartTime As Long
82Private g_SD_LastUpdate As Long
83
84Public g_SD_Abort As Boolean
85
86Private Sub Form_Load()
87
88    g_SD_Abort = False
89    g_SD_StartTime = GetTickCount()
90    g_SD_LastUpdate = g_SD_StartTime
91
92    SearchDocs.Visible = False
93    SearchDocs.Caption = GetResString(SEARCH_CAPTION)
94
95    Label3.Caption = GetResString(SEARCH_PATH_LABEL)
96    Label4.Caption = GetResString(SEARCH_FOUND_LABEL)
97    Label5.Caption = GetResString(SEARCH_INFO_LABEL)
98End Sub
99
100Public Sub SD_UpdateProgress(curObject As String, curParent As String)
101
102    Dim currTicks As Long
103    currTicks = GetTickCount()
104
105    If (Not SearchDocs.Visible) Then
106        If (currTicks - g_SD_StartTime > C_MIN_WAIT_TIME) Then
107            SearchDocs.Visible = True
108        End If
109    End If
110    If (currTicks - g_SD_LastUpdate > C_MIN_UPDATE_TIME) Then
111        g_SD_LastUpdate = currTicks
112        Label1.Caption = curParent
113        Label2.Caption = curObject
114    End If
115End Sub
116
117Private Sub AbortScan_Click()
118    g_SD_Abort = True
119End Sub
120
121Private Sub Form_Deactivate()
122    SearchDocs.ZOrder (0)
123End Sub
124
125