🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #13141

Re: Launching an application from another application

#13141
From: Remy Lebeau (TeamB)
Date: Tue, 28 Oct 2003 20:26
21 lines
1688 bytes
"David Veale" <davidv@heavymettle.com> wrote in message
news:3f9ecbef@newsgroups.borland.com...

> I want to be able to click a button on my app (App1)
> and have it launch another BCB5 VCL EXE (App2)
> that's on the computer.

Have a look at the WinExec(), ShellExecute/Ex(), and CreateProcess()
functions in the Win32 API.

> When the user's done with App2 they need to be able to close
> it and get back to App1 where they left off.

If you mean that you want App1 to wait under App2 is closed before then
continuing, then only ShellExecuteEx() and CreateProcess() provide for that.
Both can return the HANDLE for the spawned process, which you can then pass
to WaitForSingleObject() to wait until the spawned process has terminated.


Gambit
Technical Details
Message-ID: <3f9ed053@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <3f9ecbef@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,9f2ec11fedb2e7db
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-10-28 12:39:40 PST
From: "Remy Lebeau \(TeamB\)" <gambit47.no.spam@no.spam.yahoo.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <3f9ecbef@newsgroups.borland.com>
Subject: Re: Launching an application from another application
Date: Tue, 28 Oct 2003 12:26:24 -0800
Lines: 23
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 67.22.137.75
Message-ID: <3f9ed053@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1067372627 67.22.137.75 (28 Oct 2003 12:23:47 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail