VB 输入关键字搜索文件
来源:百度知道 编辑:UC知道 时间:2024/06/08 13:39:42
单击list1时shell文件
没人知道么?
用递归,遍历所有文件夹
再用几个API FindFirstFile,FindNextFile,FindClose
代码又不好写又不好调试,又没分,所以没人回答
==
两个text,两个按钮,1个listbox
Option Explicit
Private Declare Function GetOpenFileName Lib "comdlg32.dll" Alias "GetOpenFileNameA" (pOpenfilename As OPENFILENAME) As Long
Private Type OPENFILENAME
lStructSize As Long
hWndOwner As Long
hInstance As Long
lpstrFilter As String
lpstrCustomFilter As String
nMaxCustFilter As Long
nFilterIndex As Long
lpstrFile As String
nMaxFile As Long
lpstrFileTitle As String
nMaxFileTitle As Long
lpstrInitialDir As String
lpstrTitle As String
flags As Long
nFileOffset As Integer
nFileExtension As Integer
lpstrDefExt As String
lCustData As Long
lpfnHook As Long
lpTemplateName As String
End