|
-
Jan 31st, 2001, 11:42 PM
#1
Thread Starter
New Member
Say I'm building an explorer type control and I want to implement 'double-clicking' a file. So I've got the filename, is there an API call to invoke the file association, or do I have to get the info from the registry myself? I've started trying to code this, and the association info is kept all over the place, so it gets quite involved and I'd rather not bother.
Thanks.
fpitch
-
Feb 1st, 2001, 06:45 AM
#2
use the ShellExecute API
That will execute any file with the associated program, look at MSDN (Online) for details.
Gerco.
-
Feb 7th, 2001, 07:47 AM
#3
Addicted Member
My EMail is : [email protected]
Here Is The Code
Public 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
Public Const SW_SHOWNORMAL = 1
To Call This Method Type.
AppName="Notepad"
startdir="c:\"
retval = ShellExecute(0&, vbNullString, AppName, vbNullString, startdir, SW_SHOWNORMAL)
-
Feb 7th, 2001, 02:51 PM
#4
Thread Starter
New Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|