-
i'd like my app to do a search for files and figure since Windows already includes a search tool, why not just use it. But I want to add a menu item to my app that opens this Find program of windows.
Problem is, what is it called? I tried Find.exe, but get a DOS error. Check your Start menu and open the Find app. Now figure out where on the hard drive this app is located.
Any answers?
-
Find Files Dialog
The microsoft knowledge base explains this. You can access the instructions at the following URL:
http://support.microsoft.com/support...n_SRCH&SPR=VBB
-
<?>
Code:
'Use window's find/search function
Private Declare Function ShellExecute Lib "shell32.dll" Alias _
"ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, _
ByVal lpFile As String, ByVal lpParameters As String, _
ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Private Const SW_SHOWNORMAL = 1
Private Const SW_SHOWMINIMIZED = 2
Private Const SW_SHOWMAXIMIZED = 3
Private Const SW_SHOW = 5
Private Const SW_MINIMIZE = 6
Private Const SW_SHOWMINNOACTIVE = 7
Private Const SW_SHOWNA = 8
Private Const SW_RESTORE = 9
Private Const SW_SHOWDEFAULT = 10
Private Sub Command1_Click()
Dim strPathToSearch As String
strPathToSearch = "C:\"
Call ShellExecute(Me.hwnd, "find", strPathToSearch, vbNullString, _
vbNullString, SW_SHOWNORMAL)
End Sub
-
Is there a way for the VB app to intercept the list of files returned from the search?