Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to run an external application from the C++ Builder application?

2,521 views
Skip to first unread message

Timmy

unread,
Jun 7, 1999, 3:00:00 AM6/7/99
to

Lillian <cpi...@tonghua.com.cn> wrote in message
news:7jhuhu$2c...@forums.borland.com...
> I want to run the NotePad.EXE from my C++ Builder application to view
> my text file. How can I make it?
>

ShellExecute(0, "open", "notepad.exe", "", "", SW_SHOWNORMAL);

look up CreateProcess in the ISAPI help for better information. I am not
sure if you can run with params in shell execute

Lillian

unread,
Jun 8, 1999, 3:00:00 AM6/8/99
to

Lillian

unread,
Jun 9, 1999, 3:00:00 AM6/9/99
to

Lillian <cpi...@tonghua.com.cn> wrote in message
news:7jhuhu$2c...@forums.borland.com...
> I want to run the NotePad.EXE from my C++ Builder application to view
> my text file. How can I make it?
>


From: ziad khawam <za...@aub.edu.lb>
To: <cpi...@tonghua.com.cn>
Sent: Tuesday, June 08, 1999 4:00 PM
Subject: How to run an external app.


Hi Lilian,
in fact there is two way to run an external app. from C++ builder

1- If you want to stop your C++ builder program before lunching Note
Pad, use


execlp("C:\\WINDOWS\\Notepad.EXE", C:\\WINDOWS\\Notepad.EXE",NULL);


2- If you want to keep your C++ Builder running when lunching Note pad,
use


spawnlp(P_DETACH,"C:\\WINDOWS\\Notepad.EXE",
C:\\WINDOWS\\Notepad.EXE",NULL);


For more information check the help index for exec or spawn.


PLS. post the reply.

regards.
Ziad Khawam.


0 new messages