我有安装程序,我想在“wpInstalling”页面上显示多个位图图像。图像应显示在另一个下面。
答案 0 :(得分:1)
TLama可能会给你更好的解决方案,但你可以尝试这样的事情(当然你应该为你的项目修改它)
[Files]
Source: ".\01.bmp"; DestDir: "{tmp}"; Flags: dontcopy nocompression
Source: ".\02.bmp"; DestDir: "{tmp}"; Flags: dontcopy nocompression
[Code]
function InitializeSetup: Boolean;
begin
ExtractTemporaryFile('01.bmp'); //here you extract your first BMP file to temp folder
ExtractTemporaryFile('02.bmp'); //here you extract your second BMP file to temp folder
Result := True;
end;
procedure CurPageChanged(CurPageID: Integer);
var
BmpFile1, BmpFile2: TBitmapImage;
begin
if CurPageID = wpInstalling then begin
BmpFile1:= TBitmapImage.Create(WizardForm);
BmpFile1.Bitmap.LoadFromFile(ExpandConstant('{tmp}\01.bmp'));
BmpFile1.Width:= ScaleX(417);
// here you set Width (417px is Width of ProgressBar) for 1st BMP
BmpFile1.Height:= ScaleY(50);
// here you set Height for 1st BMP
BmpFile1.Stretch := True;
BmpFile1.Left := WizardForm.ProgressGauge.Left + ScaleX(0);
// here you set Left position for 1st BMP
BmpFile1.Top := WizardForm.ProgressGauge.Top + ScaleY(35);
// here you set Top posision for 1st BMP
BmpFile1.Parent:= WizardForm.InstallingPage;
BmpFile2:= TBitmapImage.Create(WizardForm);
BmpFile2.Bitmap.LoadFromFile(ExpandConstant('{tmp}\02.bmp'));
BmpFile2.Width:= ScaleX(417);
BmpFile2.Height:= ScaleY(50);
BmpFile2.Stretch := True;
BmpFile2.Left := WizardForm.ProgressGauge.Left + ScaleX(0);
BmpFile2.Top := BmpFile1.Top + BmpFile1.Height + ScaleY(8);
BmpFile2.Parent:= WizardForm.InstallingPage;
end;
end;