N
Neil
I am using ShellExecute to open JPG files with the associated application,
MS Photo Editor, from within an Access 2000 application. When the code is
run the first time (Photo Editor closed), there's a blinking in my
application title bar, and nothing appears. Then, if I do it a second time,
Photo Editor appears, but with two copies of the image. And, as long as
Photo Editor stays open, the images open fine. But if it's closed, it takes
two times to get it open.
This doesn't happen with MS Picture and Fax Viewer as the default
application. With Picture and Fax Viewer, the same code opens it up
immediately. However, users have MS Photo Editor as their default app, and
they prefer it.
Anyone know what's going on with MS Photo Editor here? Code is below.
Thanks,
Neil
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
Public Function OpenFile(strPath As String, strFilename As String)
Call ShellExecute(Application.hWndAccessApp, "open", strFilename,
vbNullString, strPath, 0)
End Function
MS Photo Editor, from within an Access 2000 application. When the code is
run the first time (Photo Editor closed), there's a blinking in my
application title bar, and nothing appears. Then, if I do it a second time,
Photo Editor appears, but with two copies of the image. And, as long as
Photo Editor stays open, the images open fine. But if it's closed, it takes
two times to get it open.
This doesn't happen with MS Picture and Fax Viewer as the default
application. With Picture and Fax Viewer, the same code opens it up
immediately. However, users have MS Photo Editor as their default app, and
they prefer it.
Anyone know what's going on with MS Photo Editor here? Code is below.
Thanks,
Neil
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
Public Function OpenFile(strPath As String, strFilename As String)
Call ShellExecute(Application.hWndAccessApp, "open", strFilename,
vbNullString, strPath, 0)
End Function