如帖子末尾的图,以前可以在最左下角附近增加一个“关于”按钮,并且点击能弹出一个对话框,对话框内内容可以自定,还有一种办法就是直接可以在按钮旁边显示一段连接字符串,点击后能打开浏览器到指定页面。以前做过后来Inno更新到5。X后就不行了。
谁能改一下代码?
CODE
[Code]
procedure AboutButtonOnClick(Sender: TObject);
begin
MsgBox('这个安装程序是绿色安装程序,无访问Internet组件,不写入注册表信息。', mbInformation, mb_Ok);
end;
procedure URLLabelOnClick(Sender: TObject);
var
Dummy: Integer;
begin
InstShellExec('http://www.ray-sky.net', '', '', SW_SHOWNORMAL, Dummy);
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.Top := AboutButton.Top + AboutButton.Height - URLLabel.Height - 2;
URLLabel.Left := AboutButton.Left + AboutButton.Width + 20;
URLLabel.Caption := 'www.ray-sky.net';
URLLabel.Font.Style := URLLabel.Font.Style + [fsUnderLine];
URLLabel.Font.Color := clBlue;
URLLabel.Cursor := crHand;
URLLabel.OnClick := @URLLabelOnClick;
URLLabel.Parent := WizardForm;
BackgroundBitmapImage := TBitmapImage.Create(MainForm);
BackgroundBitmapImage.AutoSize := True;
BackgroundBitmapImage.Bitmap := WizardForm.WizardBitmapImage.Bitmap;
BackgroundBitmapImage.Left := 50;
BackgroundBitmapImage.Top := 100;
BackgroundBitmapImage.Parent := MainForm;
BackgroundBitmapText := TNewStaticText.Create(MainForm);
BackgroundBitmapText.Caption := 'TBitmapImage';
BackgroundBitmapText.Left := BackGroundBitmapImage.Left;
BackgroundBitmapText.Top := BackGroundBitmapImage.Top + BackGroundBitmapImage.Height + 8;
BackgroundBitmapText.Parent := MainForm;
end;