?? find.frm
字號(hào):
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.Form Find
BorderStyle = 1 'Fixed Single
Caption = "查找"
ClientHeight = 2340
ClientLeft = 45
ClientTop = 330
ClientWidth = 4800
ControlBox = 0 'False
Icon = "find.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2340
ScaleWidth = 4800
StartUpPosition = 3 '窗口缺省
Begin VB.Frame Frame1
Caption = "查找范圍"
Height = 495
Left = 120
TabIndex = 3
Top = 720
Width = 3135
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "Label2"
ForeColor = &H000000FF&
Height = 255
Left = 120
TabIndex = 5
Top = 240
Width = 2895
End
End
Begin VB.Frame Frame2
Caption = "查找內(nèi)容"
Height = 615
Left = 120
TabIndex = 7
Top = 1320
Width = 3135
Begin VB.CheckBox Check2
Caption = "文件"
Height = 255
Left = 1080
TabIndex = 9
Top = 240
Value = 1 'Checked
Width = 735
End
Begin VB.CheckBox Check1
Caption = "文件夾"
Height = 255
Left = 120
TabIndex = 8
Top = 240
Value = 1 'Checked
Width = 855
End
End
Begin MSComctlLib.TreeView TreeView1
Height = 975
Left = 3480
TabIndex = 6
Top = 1200
Visible = 0 'False
Width = 1095
_ExtentX = 1931
_ExtentY = 1720
_Version = 393217
Style = 7
Appearance = 1
End
Begin VB.CommandButton Command2
Cancel = -1 'True
Caption = "返回"
Height = 375
Left = 3480
TabIndex = 2
Top = 720
Width = 1095
End
Begin VB.CommandButton Command1
Caption = "確定"
Default = -1 'True
Height = 375
Left = 3480
TabIndex = 1
Top = 240
Width = 1095
End
Begin VB.TextBox Text1
Height = 270
Left = 120
TabIndex = 0
Top = 360
Width = 3135
End
Begin VB.Label Label3
AutoSize = -1 'True
Height = 180
Left = 120
TabIndex = 10
Top = 2040
Width = 90
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "請(qǐng)輸入待查找的文件夾或文件名"
Height = 180
Left = 120
TabIndex = 4
Top = 120
Width = 2520
End
End
Attribute VB_Name = "Find"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim FindString As String
Dim Found As Boolean
Dim FoundOne As Boolean
Found = False
FindString = Trim(Text1.Text)
If FindString = "" Then
Text1.SetFocus
Exit Sub
End If
Me.Caption = "正在查找中...這需要一些時(shí)間,請(qǐng)稍候!"
TreeView1.Nodes.Clear
Me.MousePointer = 11
Dim FindKey As String
FindKey = "@@@@@***##查找結(jié)果@@@@@***##"
If Left(MainForm.TreeView1.SelectedItem.Key, 3) = "光盤庫(kù)" Then
''''''''''''''''''''''''''''''''''''''''''''''''''''
FoundOne = False
Me.MousePointer = 11
Me.TreeView1.Nodes.Clear
''''''''''''''''''''''''刪除以前查找結(jié)果
For i = 1 To MainForm.TreeView1.Nodes.Count
If MainForm.TreeView1.Nodes(i).Key = FindKey Then
Set nox = MainForm.TreeView1.Nodes(i).Child
For ii = 1 To MainForm.TreeView1.Nodes(i).Children
fname = nox.Text + ".fnd"
If Dir(fname) <> "" Then
Kill fname
End If
If ii < MainForm.TreeView1.Nodes(i).Children Then
Set nox = nox.Next
End If
Next
MainForm.TreeView1.Nodes.Remove i
Exit For
End If
Next
MainForm.TreeView1.Nodes.Add , , FindKey, "查找結(jié)果", 5
'設(shè)置查找范圍
Dim CdromArray() As Node
Dim nod As Node
kk = 0
If MainForm.TreeView1.SelectedItem.Key = "光盤庫(kù)" Then
For i = 2 To MainForm.TreeView1.Nodes.Count
If Left(MainForm.TreeView1.Nodes(i).Key, 3) = "子光盤" Then
ReDim Preserve CdromArray(kk) As Node
Set CdromArray(kk) = MainForm.TreeView1.Nodes(i)
kk = kk + 1
End If
Next
Else
For i = 2 To MainForm.TreeView1.Nodes.Count - 1
If MainForm.TreeView1.Nodes(i).Parent.Key = MainForm.TreeView1.SelectedItem.Key Then
ReDim Preserve CdromArray(kk) As Node
Set CdromArray(kk) = MainForm.TreeView1.Nodes(i)
kk = kk + 1
End If
Next
End If
For zz = 0 To UBound(CdromArray)
Set nod = CdromArray(zz)
CdromName = nod.Text
'''************'''從文件中讀取光盤鏡像
Label3.Caption = "讀取光盤 " + nod.Text + " ..."
Me.Refresh
If Dir(nod.Text + ".cdo") = "" Then
MsgBox "光盤 " + Chr(34) + nod.Text + Chr(34) + " 鏡像文件丟失,請(qǐng)重新生成!", vbCritical
Me.MousePointer = 0
Me.Caption = "查找"
Me.Label3 = "發(fā)生嚴(yán)重錯(cuò)誤!請(qǐng)檢查光盤鏡像的好與壞!"
Exit Sub
End If
Dim FileNotes As String
fnum = FreeFile
Open nod.Text + ".cdo" For Input As #fnum
Line Input #fnum, FileNotes
If FileNotes <> "@@@@@***##光盤鏡像文件@@@@@***##" Then
MsgBox "非法的光盤鏡像文件 " + Chr(34) + nod.Text + Chr(34) + Chr(13) + Chr(13) + "請(qǐng)重新生成光盤鏡像文件!", vbCritical
Close fnum
Me.MousePointer = 0
Me.Caption = "查找"
Me.Label3 = "發(fā)生嚴(yán)重錯(cuò)誤!請(qǐng)檢查光盤鏡像文件的好壞!"
Exit Sub
Else
'''正式開始
MainForm.TreeView2.Nodes.Clear
Line Input #fnum, FileNotes
MainForm.TreeView2.Nodes.Add , , FileNotes, FileNotes, 1
Do While Not EOF(fnum)
Line Input #fnum, FileNotes
If Right(FileNotes, 1) = "\" Then
fns1 = Left(FileNotes, Len(FileNotes) - 1)
For i = Len(fns1) To 1 Step -1
If Mid(fns1, i, 1) = "\" Then
Dim FnsPath As String
Dim FnsName As String
FnsPath = Left(fns1, i)
FnsName = Mid(fns1, i + 1)
Exit For
End If
Next
MainForm.TreeView2.Nodes.Add FnsPath, tvwChild, FileNotes, FnsName, 3, 2
Else
For i = Len(FileNotes) To 1 Step -1
If Mid(FileNotes, i, 1) = "\" Then
FnsPath = Left(FileNotes, i)
FnsName = Mid(FileNotes, i + 1)
Exit For
End If
Next
MainForm.TreeView2.Nodes.Add FnsPath, tvwChild, FileNotes, FnsName, 10
End If
Loop
Close fnum
End If
'''***********'''光盤鏡像寫入列表中
If Dir(CdromName + ".fnd") <> "" Then
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -