Board index » cppbuilder » Launch an external program ?

Launch an external program ?

Could someone please tell me how to launch an external program with Borland
Builder 4.
For example I want to just create a form with a button that'll then run my
"c:\napster.exe" program or whatever .exe.

Please and Thanks !

 

Re:Launch an external program ?


void __fastcall TForm1::Button1TestClick(TObject *Sender)
{
    ::WinExec("c:\\napster.exe", SW_SHOW);

Quote
}
"Arch-lab" <l...@us.com> wrote in message

news:dpk25.3645$ef6.43229@news1.rdc1.ab.home.com...
Quote
> Could someone please tell me how to launch an external program with
Borland
> Builder 4.
> For example I want to just create a form with a button that'll then run my
> "c:\napster.exe" program or whatever .exe.

> Please and Thanks !

Re:Launch an external program ?


Thank !
I also found spawn to work.

Quote
"Jarmo" <ja...@jarmo.com> wrote in message

news:8ie61l$p10$1@soap.pipex.net...
Quote
> void __fastcall TForm1::Button1TestClick(TObject *Sender)
> {
>     ::WinExec("c:\\napster.exe", SW_SHOW);
> }

> "Arch-lab" <l...@us.com> wrote in message
> news:dpk25.3645$ef6.43229@news1.rdc1.ab.home.com...
> > Could someone please tell me how to launch an external program with
> Borland
> > Builder 4.
> > For example I want to just create a form with a button that'll then run
my
> > "c:\napster.exe" program or whatever .exe.

> > Please and Thanks !

Re:Launch an external program ?


Could you tell me where that function is from? i.e. my 'Help' doesn't list
it as a function in Borland... is it a Delphi function or is it a Microsoft
creation (i found a help screen on it under the microsoft help page)?

Also, what does the :: do infront?

thanks

Quote
"Jarmo" <ja...@jarmo.com> wrote in message

news:8ie61l$p10$1@soap.pipex.net...
Quote
> void __fastcall TForm1::Button1TestClick(TObject *Sender)
> {
>     ::WinExec("c:\\napster.exe", SW_SHOW);
> }

Other Threads