On 31 May 97 Steve Rogers said to All...
SR> How can I run other programs from Delphi? In TP/BP I use the Exec
SR> procedure, but I can't find anything similar in Delphi. I am trying to
SR> make a menu program.
First thing is to understand that whereas a DOS program will wait while the
program it spawns with Exec executes, Windows will by default run the child
process in parallel with the parent. WinExec will do this. If you want the
parent process to await completion of the child, a routine called
WinExecAndWait is required, it has been published here many times - we can
list it again if you need it.
The problem is that WinExecAndWait is a Win 3.1 solution, and it can give
rise to weird effects under Win95. There is a pure Delphi2/Win95 solution,
which was mentioned here quite recently, but I don't know how to get a
Delphi 1 program to do a reliable WinExecAndWait under W95. Maybe someone
else can help.
--- PPoint 2.00
---------------
* Origin: Kingston, Canada (1:249/109.11)
|