Results 1 to 4 of 4

Thread: accessing windows Find Files

  1. #1

    Thread Starter
    Member
    Join Date
    Jul 2000
    Posts
    37
    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?

  2. #2
    New Member
    Join Date
    Feb 2001
    Posts
    4

    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

  3. #3
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    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
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

  4. #4
    New Member
    Join Date
    Feb 2001
    Posts
    4
    Is there a way for the VB app to intercept the list of files returned from the search?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width