Mega Code Archive

 
Categories / Delphi / API
 

Launching your default browser on a url

Question: How do I start up and pass an URL to the default browser? Answer: Use the ShellAPI function ShellExecute. Example: uses ShellAPI; procedure TForm1.Button1Click(Sender: TObject); begin ShellExecute(Form1.Handle, nil, 'http://www.borland.com', nil, nil, SW_SHOWNORMAL); end;