编辑该控件OnLinkLink事件,代码如下:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls,ShellAPI;
type
TForm1 = class(TForm)
LinkLabel1: TLinkLabel;
procedure LinkLabel1LinkClick(Sender: TObject; const Link: string;
LinkType: TSysLinkType);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.LinkLabel1LinkClick(Sender: TObject; const Link: string;
LinkType: TSysLinkType);
begin
ShellExecute(Application.Handle,'open',PChar(Link),'','',SW_SHOWNORMAL);
end;
end.