ShellExecute not working properly
From: Anchorman (JesseN0SPAM_at_davinci-mims.com)
Date: 10/30/03
- Next message: omer: "const var procedure parameters"
- Previous message: Bob Bedford: "3 levels objects...need help."
- Next in thread: Marc Rohloff: "Re: ShellExecute not working properly"
- Reply: Marc Rohloff: "Re: ShellExecute not working properly"
- Reply: Rob Kennedy: "Re: ShellExecute not working properly"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 30 Oct 2003 08:14:34 -0500
I have the following simple function:
procedure TMainFrm.ViewFile(const cFileName : String);
Begin
ShellExecute(Handle,'open',pChar(cFileName), NIL,NIL,SW_SHOW);
end;
cFileName contains both the path and file name to execute. I know that the
path and file name are valid, because I can copy the contents of this
variable to the clip board (while in the delphi debugger), and paste it in
the Run command in Windows, press Enter, and it properly brings up Acrobat,
and loads the file.
What is happening here is that this function will bring up Acrobat, then
Acrobat appears to exit before it loads or displays the file.
I've tried supplying the path where the file is in the parameter for that in
ShellExecute, and I've also tried various other SW_* settings, but nothing
seems to make a difference.
I'm using Delphi, and currently running on Windows 2000, but this app will
be deployed to all sorts of Windows versions.
Thanks,
Jesse
www.davinci-mims.com
- Next message: omer: "const var procedure parameters"
- Previous message: Bob Bedford: "3 levels objects...need help."
- Next in thread: Marc Rohloff: "Re: ShellExecute not working properly"
- Reply: Marc Rohloff: "Re: ShellExecute not working properly"
- Reply: Rob Kennedy: "Re: ShellExecute not working properly"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|