[转帖]
1、显示红框1(也就是“
Inno Installer 5.x”),在脚本代码最后输入 引用:
[Messages]
BeveledLabel=Inno Installer 5.x
红色字可以替换为你想要的文字(比如程序名称)
2、显示红框2和红框3(也就是“About”和网址) 引用:
[Code]
procedure AboutButtonOnClick(Sender: TObject);
begin
MsgBox('这个演示显示一些向导窗体对象和各种 VCL 类的功能。', mbInformation, mb_Ok);
end;
procedure URLLabelOnClick(Sender: TObject);
var
ErrorCode: Integer;
begin
ShellExec('open', 'http://www.innosetup.com', '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode);
end;
procedure InitializeWizard();
var
AboutButton, CancelButton: TButton;
URLLabel: TNewStaticText;
BackgroundBitmapImage: TBitmapImage;
BackgroundBitmapText: TNewStaticText;
begin
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 := '关于(&A)...';
AboutButton.OnClick := @AboutButtonOnClick;
AboutButton.Parent := WizardForm;
URLLabel := TNewStaticText.Create(WizardForm);
URLLabel.Caption := 'www.innosetup.com';
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);
end;
OK!替换红色的就可以了!
简要解释 引用:
[Code]
procedure AboutButtonOnClick(Sender: TObject); //当关于键被按下时产生的行为
begin
MsgBox(#13 '梦想吧(似水年华) 制作'#13#13 'Copyright (C) 2006 WWW.DREAMS8.COM', mbInformation, MB_OK);
end;
procedure URLLabelOnClick(Sender: TObject); ////当URL键被按下时产生的行为
var
ErrorCode: Integer;
begin
ShellExec('open', 'http://www.dreams8.com.com', '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode);
end;
procedure InitializeWizard();
var
AboutButton, CancelButton: TButton;
URLLabel: TNewStaticText; //建立一个url的按钮
begin
//窗体文本颜色------------------------------------------
WizardForm.PAGENAMELABEL.Font.Color:= clRed;
WizardForm.PAGEDESCRIPTIONLABEL.Font.Color:= clBlack;
WizardForm.WELCOMELABEL1.Font.Color:= clBlack;
WizardForm.WELCOMELABEL2.Font.Color:= clOlive;
{ 其它自定义控制 }
CancelButton := WizardForm.CancelButton;
AboutButton := TButton.Create(WizardForm);
AboutButton.Left := WizardForm.ClientWidth - CancelButton.Left - CancelButton.Width;
AboutButton.Top := CancelButton.Top - 0; //按扭在窗体上的位置
//按扭宽/高
AboutButton.Width := ScaleX(60);
AboutButton.Height := ScaleY(22);
AboutButton.Caption := '关于(&A)'; //按扭标题
AboutButton.OnClick := @AboutButtonOnClick; //事件激活
AboutButton.Parent := WizardForm;
//添加一个Labe标签-----------------------------------------------------------------------
URLLabel := TNewStaticText.Create(WizardForm);
URLLabel.Caption := '访问 梦想吧|DREAMS8';
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 := clRed;
URLLabel.Top := AboutButton.Top + AboutButton.Height - URLLabel.Height - 2;
URLLabel.Left := AboutButton.Left + AboutButton.Width + ScaleX(20);
end;
附件
inno_t.gif (1.88 KB) 2007-1-28 07:43 PM
