TIP: Click on subject to list as thread! ANSI
echo: delphi
to: STEVE ROGERS
from: BRYAN SMITH
date: 1997-06-01 11:16:00
subject: shelling from Delphi

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)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.