Open File with doubleclick in CommDlg-Object

K

KarlT

Hello Access-Developers,

I use the CommDlg-OCX to access the Windows file system. This works fine
except one point: The selected files don't open using a doubleclick on the
filename. It works with a rightclick on the filename and selecting "Open"
from the menu. But this is not what the user wants.

Thanks for any help

Karl
 
S

Stefan Hoffmann

hi Karl,
I use the CommDlg-OCX to access the Windows file system. This works fine
except one point: The selected files don't open using a doubleclick on the
filename. It works with a rightclick on the filename and selecting "Open"
from the menu. But this is not what the user wants.
Using

Declare Function GetOpenFileNameA Lib "comdlg32.dll" _
(AOpenFileName As TypeOpenFileName _
) As Boolean

works.

So posting your code may enlighten us.

btw, maybe the double-click is not detected (wrong speed settings)?

mfG
--> stefan <--
 
D

Douglas J. Steele

The GetOpenFileName API (which the OCX wraps around) doesn't open the
selected files: it strictly returns their names.

It's up to you to do whatever you need to do with those file names once
you've got them returned to your code.

If it's open files in a specific application, look at the FollowHyperlink
method.
 
K

KarlT

Thanks a lot, Doug. The FollowHyperlink-Method is what I was looking for.
Must admit that I heard about it today for the first time. The application
works now fine.

Karl
 
Top