📄 文件搜索器(api).frm
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 5640
ClientLeft = 60
ClientTop = 345
ClientWidth = 7995
LinkTopic = "Form1"
ScaleHeight = 5640
ScaleWidth = 7995
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command4
Caption = "退出"
Height = 330
Left = 6390
TabIndex = 11
Top = 315
Width = 1050
End
Begin VB.PictureBox Picture1
BackColor = &H00FFFFFF&
Height = 2985
Left = 45
ScaleHeight = 2925
ScaleWidth = 2745
TabIndex = 9
Top = 2340
Width = 2805
Begin VB.Image Image1
Height = 2850
Left = 45
Top = 45
Visible = 0 'False
Width = 2670
End
Begin VB.Label Label1
BackColor = &H00FFFFFF&
Caption = "预览区"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 330
Left = 720
TabIndex = 10
Top = 1035
Width = 915
End
End
Begin VB.Frame Frame3
Caption = "搜索类型/文件"
Height = 1320
Left = 45
TabIndex = 5
Top = 945
Width = 2805
Begin VB.CommandButton Command3
Caption = "停止"
Enabled = 0 'False
Height = 285
Left = 1800
TabIndex = 8
Top = 810
Width = 825
End
Begin VB.CommandButton Command2
Caption = "搜索"
Height = 285
Left = 810
TabIndex = 7
Top = 810
Width = 825
End
Begin VB.ComboBox Combo2
Height = 300
Left = 180
TabIndex = 6
Text = "Combo2"
Top = 315
Width = 1815
End
End
Begin MSComctlLib.StatusBar StatusBar1
Align = 2 'Align Bottom
Height = 285
Left = 0
TabIndex = 4
Top = 5355
Width = 7995
_ExtentX = 14102
_ExtentY = 503
_Version = 393216
BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628}
NumPanels = 2
BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628}
EndProperty
BeginProperty Panel2 {8E3867AB-8586-11D1-B16A-00C0F0283628}
AutoSize = 1
Object.Width = 11033
EndProperty
EndProperty
End
Begin MSComctlLib.ListView ListView1
Height = 4470
Left = 2925
TabIndex = 3
Top = 855
Width = 5010
_ExtentX = 8837
_ExtentY = 7885
MultiSelect = -1 'True
LabelWrap = -1 'True
HideSelection = -1 'True
_Version = 393217
ForeColor = -2147483640
BackColor = -2147483643
BorderStyle = 1
Appearance = 1
NumItems = 0
End
Begin VB.Frame Frame1
Caption = "搜索路径"
Height = 690
Left = 45
TabIndex = 0
Top = 90
Width = 5685
Begin VB.CommandButton Command1
Caption = "浏览"
Height = 285
Left = 4365
TabIndex = 2
Top = 270
Width = 825
End
Begin VB.TextBox Text1
Height = 285
Left = 180
TabIndex = 1
Text = "C:\"
Top = 270
Width = 3795
End
End
Begin VB.Menu popMenu
Caption = "popMenu"
Visible = 0 'False
Begin VB.Menu mnuCopy
Caption = "复制到..."
End
Begin VB.Menu mnuSelectAll
Caption = "全选"
End
Begin VB.Menu mnuRevSelect
Caption = "反向选择"
End
Begin VB.Menu mnuSelectNone
Caption = "取消选择"
End
Begin VB.Menu mm
Caption = "-"
End
Begin VB.Menu mnuDel
Caption = "删除"
End
Begin VB.Menu mnuRename
Caption = "重命名"
End
Begin VB.Menu mnuAttr
Caption = "属性"
End
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Declare Function SHGetPathFromIDList Lib "Shell32.dll" Alias "SHGetPathFromIDListA" (ByVal pidl As Long, ByVal pszPath As String) As Long
Private Declare Function SHBrowseForFolder Lib "Shell32.dll" Alias "SHBrowseForFolderA" (lpBrowseInfo As BROWSEINFO) As Long
Private Type BROWSEINFO '用于选择目录对话框的结构
hOwer As Long
pidlRoot As Long
pszDisplayName As String
lpszTitle As String
ulFlags As Long
lpfn As Long
lParam As Long
ilmage As Long
End Type
Private Const BIF_RETURNONLYFSDIRS = 0 '此常数的值待查
Private lindex As Long
Private Pflag As Boolean
'以下为显示文件属性对话框时用到的声明
Private Type SHELLEXECUTEINFO
cbSize As Long
fMask As Long
hwnd As Long
lpVerb As String
lpFile As String
lpParameters As String
lpDirectory As String
nShow As Long
hInstApp As Long
' Optional fields
lpIDList As Long
lpClass As String
hkeyClass As Long
dwHotKey As Long
hIcon As Long
hProcess As Long
End Type
Private Const SEE_MASK_INVOKEIDLIST = &HC
Private Const SEE_MASK_NOCLOSEPROCESS = &H40
Private Const SEE_MASK_FLAG_NO_UI = &H400
Private SEI As SHELLEXECUTEINFO
Private Declare Function ShellExecuteEX Lib "Shell32.dll" Alias "ShellExecuteEx" (SEI As SHELLEXECUTEINFO) As Long
'以下为利用API查找文件的声明
Private Declare Function FindFirstFile Lib "kernel32" Alias "FindFirstFileA" (ByVal lpFileName As String, lpFindFileData As WIN32_FIND_DATA) As Long
Private Declare Function FindNextFile Lib "kernel32" Alias "FindNextFileA" (ByVal hFindFile As Long, lpFindFileData As WIN32_FIND_DATA) As Long
Private Declare Function FindClose Lib "kernel32" (ByVal hFindFile As Long) As Long
Private Const FILE_ATTRIBUTE_DIRECTORY = &H10
Private Const MAX_PATH = 260
Private Type FILETIME
dwLowDateTime As Long
dwHighDateTime As Long
End Type
Private Type WIN32_FIND_DATA
dwFileAttributes As Long
ftCreationTime As FILETIME
ftLastAccessTime As FILETIME
ftLastWriteTime As FILETIME
nFileSizeHigh As Long
nFileSizeLow As Long
dwReserved0 As Long
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -