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 1 4448
On Fri, 10 Mar 2006 17:29:47 GMT, "Neil" <no****@nospam.net> wrote: 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.
...
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
I don't have PhotoEditor here to test it, but part of the problem may
be the nShowCmd arg. 0 equates to SW_HIDE, so unless the app overrides
it (which PE apparently does not), you end up launching an instance
with no visible UI. Change it to SW_NORMAL (1) and see what happens.
-Tom
MVP - Visual Basic
(please post replies to the newsgroup) This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Zeroeffect |
last post by:
Hello!
I have a database with alot of embedded images. The reason for having
the images embedded is security.
My problem is that it works fine on my computer, but not on my clients
computer....
|
by: falk.strobach |
last post by:
Hallo,
ich habe mir im Access eine Bilddatenbank angelegt. Die Bilder sind als
OLE-Objekt (verbunden mit dem Photo Editor) in der Datenbank enthalten.
Mit der Umstellung auf MS Office 2003 gibt...
|
by: Wiktor Zychla |
last post by:
I have a problem I cannot solve.
My application hosts IE activex control. I follow the standard procedure: I
just aximp shdocvw.dll. Note that this gives you two files: axshdocvw.dll
and...
|
by: the_openFace |
last post by:
I'm trying to display the shell's property page for various files and I'm
using this code:
class Win32Shell {
// ... other stuff here
public static extern Int32 ShellExecute(
Int32 hwnd,...
|
by: Throw |
last post by:
G'day everyone
I'm looking for a simple photo gallery script in PHP (or Perl), but not
too simple. I have tried several photo gallery scripts in either
language and I have found that they are...
| |
by: =?Utf-8?B?SnVhbiBDYXJsb3M=?= |
last post by:
how create a small photo editor in visual basic.net??? just the basic,
resize, contrast, etc. TY!
|
by: dclingan |
last post by:
OS XP
Access 2003
additional program available MS Photo Editor 3
I understand Access 2003 did not come with Photo Editor and such needs to be installed. I have done this. I have inserted a...
|
by: fnwtech |
last post by:
I have been reading the forums, but I really need a step by step. I took a one day vb class about 3 years ago, so I know just enough to be confused!
I have a database of students that I have to...
|
by: piyusht |
last post by:
Hello,
I have a small piece of code to launch a file and print it to desired printer. The code is as follows:
objProcess.StartInfo.FileName = "C:\test.jpg";
objProcess.StartInfo.WindowStyle...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| |
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| |