Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
 
 
 
500MB 27GB Web Hosting - $9.95/Month
 
 
 
 
 
Old Pages
 
Old Index
Site Map
What's New
 
Books
How To
Tips & Tricks
Tutorials
Stories
Performance
Essays
Links
Q & A
New in VB6
Free Stuff
Pictures
 
 
 
TitleFind the default executable for a file
Keywordsdefault, associated, executable, file
CategoriesFiles & Directories, Windows
 
Use the FindExecutable API function.
 
Private Sub cmdFindProgram_Click()
    file_name = txtFileName.Text
    pos = InStrRev(file_name, "\")
    file_path = Left$(file_name, pos)
    file_name = Mid$(file_name, pos + 1)
    result = Space$(1024)

    FindExecutable file_name, file_path, result

    pos = InStr(result, Chr$(0))
    result = Left$(result, pos - 1)

    lblResult.Caption = result
End Sub
 
Formatted by Neil Crosby
 
 
Copyright © 1997-2003 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated