| Label URL (web-link on a form) | mortenbs.com Last updated 2009. |
Create clickable link to a web address (on a delphi form), that pops up in a new window.Doubleclick on the label to create
OnClick event, and insert source code:
uses
shellApi;
function launchUrl(aUrl:string;h:tHandle=0):boolean;
begin
if h=0 then h:=application.handle;
result:=shellExecute(h,pChar('open'),pChar(aUrl),nil,nil,SW_NORMAL)>0
end;
procedure TForm1.Label1Click(Sender: TObject);
begin
launchUrl('http://www.mortenbs.com/it/delphi/')
end;
Delphi source HTML generated by PAS to HTM | Mini converter, mortenbs.comSee also
Delphi programming - Basics, Components, links...
IT - IT/Technology. Various projects and information about computer technology and electronic...
mortenbs.com