Re: ShellExecute?

Posted by webmaster Guido on June 15, 2000
In Reply to: ShellExecute? posted by Leox on June 14, 2000

: What am I doing wrong when I'm using the ShellExecute command? Is it just like this

: procedure TForm1.Button1Click(Sender: TObject);
: begin
: ShellExecute(Handle, 'open', PChar('c:\test\readme.txt'), nil, nil, SW_SHOW);
: end;

: But when I'm doing this it says
: [Error] Unit1.pas(28): Undeclared identifier: 'ShellExecute'

: What do I have to do to make it work? Thanks in Advance.
: //Johan

---------------

You should add SHELLAPI to the USES clause that is on top of your PAS-file, because it's in that module that ShellExecute is defined.


Find related articles

Search for:  shellexecute


 

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