Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

open external browser

Status
Not open for further replies.

BoDGie

Programmer
Joined
Jun 18, 2003
Messages
6
Location
AU
What code do i need for an onclick function with a label to open an external web browser.. like a hyperlink basically.

Thanks,
Trent
 
The following code will open up the Tek-tips page in your default browser from a button click.
Code:
Uses ShellApi;

procedure TForm1.Button1Click(Sender: TObject);
begin
  ShellExecute ( hInstance, 'open', pchar('[URL unfurl="true"]www.tek-tips.com'),[/URL] nil, nil, SW_NORMAL );
end;

Andrew
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top