Delphi 2009 之 TLinkLabel
2008-08-13 17:40
183 查看
本例效果图:
代码文件:
窗体文件:
代码文件:
unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TForm1 = class(TForm) LinkLabel1: TLinkLabel; procedure FormCreate(Sender: TObject); procedure LinkLabel1LinkClick(Sender: TObject; Link: string; LinkType: TSysLinkType); end; var Form1: TForm1; implementation {$R *.dfm} uses ShellAPI; procedure TForm1.FormCreate(Sender: TObject); begin LinkLabel1.Caption := '<a href="http://del.cnblogs.com">万一的 Delphi 博客</a>'; end; procedure TForm1.LinkLabel1LinkClick(Sender: TObject; Link: string; LinkType: TSysLinkType); begin ShellExecute(0, nil, PChar(Link), nil, nil, 1); end; end.
窗体文件:
object Form1: TForm1 Left = 23 Top = 87 Caption = 'Form1' ClientHeight = 122 ClientWidth = 291 Color = clBtnFace Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -11 Font.Name = 'Tahoma' Font.Style = [] OldCreateOrder = False Position = poDesigned OnCreate = FormCreate PixelsPerInch = 96 TextHeight = 13 object LinkLabel1: TLinkLabel Left = 24 Top = 24 Width = 53 Height = 17 Caption = 'LinkLabel1' TabOrder = 0 OnLinkClick = LinkLabel1LinkClick end end
相关文章推荐
- Delphi 2009 之 TLinkLabel
- delphi2009 vcl - Tlinklabel(链接标签)
- Delphi 2009 之 TLinkLabel
- RegularExpressions(1) 一个 Net 样式的、适用于 Delphi 2009 之后版本的正则表达式组件
- Delphi 项目迁移到 Tiburon(Delphi2009,Delphi2010) 中的注意事项
- Delphi 2009 gif动画方法
- Delphi泛型结合接口的应用 (译自Delphi2009 Handbook)
- [DELPHI] D2009控件的安装
- Delphi线程池(Delphi2009以上版本适用)
- 二、Delphi 2009 泛型容器单元(Generics.Collections)[1]: TList<T>
- delphi 2009 IdSMTP 發郵件中文亂碼問題
- delphi 2009 ActiveX控件 常见问题
- Delphi 2009(Tiburon)终于快要发布了
- Delphi 2009 泛型容器单元(Generics.Collections)[2]: TQueue
- 现有Delphi项目迁移到D2009中的注意事项
- Delphi2009迁移注意事项(转)
- Delphi 2009 中的资源文件编辑器
- Delphi2009(Tiburon)新特性-匿名方法示例
- Tiburon - new language features for Delphi 2009(有关泛型的)
- 查看所有 Unicode 字符 [Delphi 2009]