Option Explicit
Private Sub Command1_Click()
Dim n As String
n = InputBox("输入路径", , "C:\")
File1.Path = n
File1.Pattern = "*"
End Sub
Private Sub Command2_Click()
Dim n As String
n = InputBox("输入关键字", , "*")
File1.Pattern = "*" & n & "*"
End Sub
Private Sub File1_Click()
Shell "c:\windows\system32\cmd.exe /c start """" """ & File1.Path & "\" & File1.List(File1.ListIndex) & """"
End Sub
Private Sub Form_Load()
Command1.Caption = "显示内容"
Command2.Caption = "查找文件"
File1.Pattern = "%%%%%%%%"
End Sub
温馨提示:答案为网友推荐,仅供参考