Board index » delphi » Help with execprogram please

Help with execprogram please

Hi All,

I have a copy of Delphi 2 (off the front cover of a computer magazine
hence no manuals)

I am trying to get a simple application to work that launches another
one using execprogram.

I have got as far as :

procedure TForm1.AcrobatClick(Sender: TObject);
begin
     ExecProgram('acrobat.exe', 1);
end;

but I keep getting:-

Error d:\project\unit1.pas(39);Undeclared identifier: ExecProgram

I have tried all the help files for execprogram to no avail. I am
assuming that I need to include some header, probably in the "uses"
section. Can anyone help?

Thanks in advance and no this is not a home work question!

Chris
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\/\  Chris Hills          Staffs /\/\/\/\/\/
/\/\/\/\/\/\/\/\/\     England      /\/\/\/\/\/\/\/\
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

 

Re:Help with execprogram please


Hello,

I don't know the fuction you mention but you can try with ShellExecute which
is an API windows. Or you can use ExecuteFile which is an Delphi
implementation you can find in unit FMXUtils, then don't forget to add this
unit in the uses clause.

R.B
jhfdjhgjgj <ch...@phaedsys.demon.co.uk> a crit dans le message :
7ttsoFAFBos4E...@phaedsys.demon.co.uk...

Quote
> Hi All,

> I have a copy of Delphi 2 (off the front cover of a computer magazine
> hence no manuals)

> I am trying to get a simple application to work that launches another
> one using execprogram.

> I have got as far as :

> procedure TForm1.AcrobatClick(Sender: TObject);
> begin
>      ExecProgram('acrobat.exe', 1);
> end;

> but I keep getting:-

> Error d:\project\unit1.pas(39);Undeclared identifier: ExecProgram

> I have tried all the help files for execprogram to no avail. I am
> assuming that I need to include some header, probably in the "uses"
> section. Can anyone help?

> Thanks in advance and no this is not a home work question!

> Chris
> /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
> \/\/\/\/\/\  Chris Hills          Staffs /\/\/\/\/\/
> /\/\/\/\/\/\/\/\/\     England      /\/\/\/\/\/\/\/\
> \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

Re:Help with execprogram please


Try either WinExec of ShellExecute.

--

Woody

Quote
"jhfdjhgjgj" <ch...@phaedsys.demon.co.uk> wrote in message

news:7ttsoFAFBos4EAs9@phaedsys.demon.co.uk...
Quote
> Hi All,

> I have a copy of Delphi 2 (off the front cover of a computer magazine
> hence no manuals)

> I am trying to get a simple application to work that launches another
> one using execprogram.

> I have got as far as :

> procedure TForm1.AcrobatClick(Sender: TObject);
> begin
>      ExecProgram('acrobat.exe', 1);
> end;

> but I keep getting:-

> Error d:\project\unit1.pas(39);Undeclared identifier: ExecProgram

> I have tried all the help files for execprogram to no avail. I am
> assuming that I need to include some header, probably in the "uses"
> section. Can anyone help?

> Thanks in advance and no this is not a home work question!

> Chris
> /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
> \/\/\/\/\/\  Chris Hills          Staffs /\/\/\/\/\/
> /\/\/\/\/\/\/\/\/\     England      /\/\/\/\/\/\/\/\
> \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

Other Threads