⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 find.frm

📁 光盘管家
💻 FRM
📖 第 1 页 / 共 2 页
字号:
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         =   "查找内容"
      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         =   "请输入待查找的文件夹或文件名"
      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 = "正在查找中...这需要一些时间,请稍候!"
TreeView1.Nodes.Clear
Me.MousePointer = 11
Dim FindKey As String
FindKey = "@@@@@***##查找结果@@@@@***##"
If Left(MainForm.TreeView1.SelectedItem.Key, 3) = "光盘库" Then
   ''''''''''''''''''''''''''''''''''''''''''''''''''''
      FoundOne = False
      Me.MousePointer = 11
      Me.TreeView1.Nodes.Clear
      ''''''''''''''''''''''''删除以前查找结果
      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, "查找结果", 5
   '设置查找范围
      Dim CdromArray() As Node
      Dim nod As Node
      kk = 0
   If MainForm.TreeView1.SelectedItem.Key = "光盘库" 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) + " 镜像文件丢失,请重新生成!", vbCritical
         Me.MousePointer = 0
         Me.Caption = "查找"
         Me.Label3 = "发生严重错误!请检查光盘镜像的好与坏!"
         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) + "请重新生成光盘镜像文件!", vbCritical
         Close fnum
         Me.MousePointer = 0
         Me.Caption = "查找"
         Me.Label3 = "发生严重错误!请检查光盘镜像文件的好坏!"
         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

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -