📄 about.pas
字号:
unit About;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, Math, Shellapi;
type
TfmAbout = class(TForm)
lblCopyright: TLabel;
lblDescription: TLabel;
Label3: TLabel;
Button1: TButton;
lblURL: TLabel;
lblMailto: TLabel;
procedure Button1Click(Sender: TObject);
procedure lblCopyrightMouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
procedure lblURLClick(Sender: TObject);
procedure lblMailtoClick(Sender: TObject);
procedure FormActivate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
fmAbout: TfmAbout;
implementation
{$R *.DFM}
procedure TfmAbout.Button1Click(Sender: TObject);
begin
Close;
end;
procedure TfmAbout.lblCopyrightMouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
procedure HighlightLabel(lbl: TLabel);
begin
lbl.Font.Color:= clBlue;
lbl.Font.Style:= lbl.Font.Style + [fsUnderline];
end;
begin
if Sender = lblURL then HighlightLabel(lblURL) else
if Sender = lblMailto then HighlightLabel(lblMailto) else
begin
lblURL.Font.Color:= clBlack;
lblURL.Font.Style:= lblURL.Font.Style - [fsUnderline];
lblMailto.Font.Color:= clBlack;
lblMailto.Font.Style:= lblMailto.Font.Style - [fsUnderline];
end;
end;
procedure TfmAbout.lblURLClick(Sender: TObject);
begin
ShellExecute(0, nil, PChar(lblURL.Caption), '', '', 0);
end;
procedure TfmAbout.lblMailtoClick(Sender: TObject);
begin
ShellExecute(0, nil, PChar(lblMailto.Caption), '', '', 0);
end;
procedure TfmAbout.FormActivate(Sender: TObject);
begin
lblDescription.Caption:= Application.Title;
ClientWidth:= 2 * lblDescription.Left +
Max(lblDescription.Width, lblCopyright.Width);
Button1.Left:= (ClientWidth - Button1.Width) div 2;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -