Board index » delphi » Executing other programs from a Delphi(2) app

Executing other programs from a Delphi(2) app

How do I do it (win 95/98)?   I can't find anything in the help files.
                    RM

 

Re:Executing other programs from a Delphi(2) app


Look at the function ShellExecute(uses ShellApi).I don't know if it works in
D2.

Ex.:

if shellexecute(handle,'open',pchar(c:\YourProg.exe'),'','',sw_show)<33 then
showmessage('Error');
--
Vladimir Alexandrov
Sweden
<valexand...@hotmail.com>
ICQ # 86729605

Re:Executing other programs from a Delphi(2) app


All versions of Delphi (including D1) have a demo of using ShellExecute.
Look for a file called FmxUtils.Pas in the demo directory

Mike

Quote
"RM" <no@email> wrote in message news:trdvmp9cb12531@corp.supernews.com...

> How do I do it (win 95/98)?   I can't find anything in the help files.
>                     RM

Re:Executing other programs from a Delphi(2) app


Quote
"RM" <no@email> wrote in message news:trdvmp9cb12531@corp.supernews.com...

See ShellExecute & CreateProcess examples at

http://www.bancoems.com/mini_faq_examples.htm

Re:Executing other programs from a Delphi(2) app


You can use WinExec

eg. WinExec('c:\windows\calc.exe', SW_SHOWNORMAL);

or you can use ShellExecute, which is a bit more complicated.  These are two
standard WinAPI calls... doesn't Delphi 2 come with a Microsoft SDK that
includes help on topics like this?

Good luck

--
JoHaN
<<< johanmeiring at yahoo dot com >>>
ICQ: 92146999
--
"If music be the food of love, play on"
                                     -- Shakespeare

Quote
"RM" <no@email> wrote in message news:trdvmp9cb12531@corp.supernews.com...

> How do I do it (win 95/98)?   I can't find anything in the help files.
>                     RM

Other Threads