delphi2009 vcl - Tlinklabel(链接标签)
时间:2011-02-08 来源:巅枫
编辑该控件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.
相关阅读 更多 +