Open a HyperLink in the Default Browser





4
Date Submitted Tue. Oct. 24th, 2006 12:12 PM
Revision 1 of 1
Helper bright
Tags Delphi | http | Hyperlink | Internet | Link
Comments 2 comments
This bit of code will open up the http link in a new browser window. The link should be passed to the variable "HTML_File" as a string (as shown below).


uses
  ShellAPI 
  {make sure you add this to the uses section at the top of the unit}


procedure TForm1.OpenHyperlink;
var
  HTML_File: string;
begin
  HTML_File := 'http://www.google.com';
  ShellExecute(Handle, 'open', PChar(HTML_File), nil, nil, SW_SHOW);
end;

 

  OpenHyperlink();
 

Comments

Comments Arguments
Wed. Oct. 25th, 2006 1:43 PM    Scripter ctiggerf
  Comments Re: Arguments
Fri. Oct. 27th, 2006 8:49 AM    Helper bright

Voting