procedure TForm1.FormCreate(Sender: TObject);
var filename,directory,exefile:PChar;
begin
getmem(filename,255);
getmem(directory,255);
getmem(exefile,255);
filename:=string('adver.htm');
directory:=string('c:\');
if findexecutable(filename,directory,exefile)>32 then
begin
edit1.text:=string(exefile); //=path+name for browser
end;
end;
remember that filename MUST be an existing file.
---
>Is there a way or a component for Delphi 3 that I can use to pass
a URL to
>a default browser and send it to the page. If the browser is not already
>pen, fire that as well?
I use:
ShellExecute( Application.Handle, 'open', 'http://cleanandsimple.com',
nil, nil, SW_NORMAL );
to send folks to my site. Be sure to include ShellAPI in your
uses clause.