Re: run Shellexecute in Delphi

Posted by webmaster Guido on August 31, 2003
In Reply to: please help me to run Shellexecute posted by esmail on August 31, 2003

: when run Shellexecute in delphi5,
: the error :Undeclared identifier: 'ShellExecute' is appeared.
: what's my wrong?
: example:
: procedure TForm1.Button1Click(Sender: TObject);
: begin
: ShellExecute(Handle,'open',PChar('Notepad'),PChar('C:\readme.txt'),nil,SW_show);
: end;
--------------

You have to add SHELLAPI to the USES directive on top of your unit (SHELLAPI is the name of the unit that defines ShellExecute).


Find related articles

Search for:  shellexecute

 



 

Delphi Forum :: Tutorials :: Source code :: Tips