<pre class="brush:delphi;toolbar:false">;先定义
#define appUrl
procedure URLLabelOnClick(Sender: TObject);
var
ErrorCode: Integer;
begin
ShellExec('open', '{#appurl}', '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode);
end;
procedure AboutButtonOnClick(Sender: TObject);
begin
MsgBox('Èí¼þ¿ª·¢ zhenggc^'#13#10 '{#appurl}' , mbInformation, MB_OK);
//这是关于按钮里面的内容 #13#10是换行的意思
end;
procedure InitializeWizard();
var
f:string;
ErrorCode: Integer;
begin
RedesignWizardForm;
WizardForm.PAGENAMELABEL.Font.Color:= clred;
WizardForm.PAGEDESCRIPTIONLABEL.Font.Color:= clBlue;
WizardForm.WelcomeLabel1.Font.Color:= clNavy;
WizardForm.WelcomeLabel2.Font.Color:= clTeal;
CancelButton := WizardForm.CancelButton;
AboutButton := TButton.Create(WizardForm);
AboutButton.Left := WizardForm.ClientWidth - CancelButton.Left - CancelButton.Width;
AboutButton.Top := CancelButton.Top;
AboutButton.Width := CancelButton.Width;
AboutButton.Height := CancelButton.Height;
AboutButton.Caption := '关于';
AboutButton.OnClick := @AboutButtonOnClick;
AboutButton.Parent := WizardForm;
URLLabel := TNewStaticText.Create(WizardForm);
URLLabel.Caption := '作者';
URLLabel.Cursor := crHand;
URLLabel.OnClick := @URLLabelOnClick;
URLLabel.Parent := WizardForm;
{ Alter Font *after* setting Parent so the correct defaults are inherited first }
URLLabel.Font.Style := URLLabel.Font.Style + [fsUnderline];
URLLabel.Font.Color := clBlue;
URLLabel.Top := AboutButton.Top + AboutButton.Height - URLLabel.Height - 2;
URLLabel.Left := AboutButton.Left + AboutButton.Width + ScaleX(20);
urllabel.showhint :=true;
urllabel.hint :='点击访问作者网站';
end;</pre><p> </p>