Board index » delphi » Running another windows program from inside a Delphi program

Running another windows program from inside a Delphi program

Does anybody know how to run another windows program from inside
a Delphi program.   I have found a command called "ExecProgram",
but cannot get the delphi compiler to recognize it.  Any
suggestions about that command or any better ways of
accomplishing the same thing would be appreciated.
 

Re:Running another windows program from inside a Delphi program


Quote
Jonathan Drexler <jdrex...@urfim.ucla.edu> wrote:
>Does anybody know how to run another windows program from inside
>a Delphi program.   I have found a command called "ExecProgram",
>but cannot get the delphi compiler to recognize it.  Any
>suggestions about that command or any better ways of
>accomplishing the same thing would be appreciated.

        ExecProgram is a WinHelp macro (so for example you can use it
to run a program from a button in a help file), not a Delphi or Windows
function.

        You can run programs from Delphi via the WinExec or ShellExecute
functions.

--
David Ullrich
Don't you guys find it tedious typing the same thing
after your signature each time you post something?
I know I do, but when in Rome...

Re:Running another windows program from inside a Delphi program


Jonathan Drexler <jdrex...@urfim.ucla.edu> schrijft:

Quote
> Does anybody know how to run another windows program from inside
> a Delphi program.   I have found a command called "ExecProgram",
> but cannot get the delphi compiler to recognize it.  Any
> suggestions about that command or any better ways of
> accomplishing the same thing would be appreciated.

use

 ShellExecute  in Shellapi unit

 or

 WinExec / LoadModule  in Winprocs unit

see delphi help files

Other Threads