Inno CustomPage与全尺寸背景图片

时间:2010-09-08 07:40:51

标签: inno-setup

为什么我的位图不是全屏尺寸?

BitmapImage1 := TBitmapImage.Create(Page);

它在某种程度上被INNO缩小了?

2 个答案:

答案 0 :(得分:0)

Tom,您必须设置ParentAlignStretch属性,以填充带有图片的自定义页面的背景。

试试这段代码

var
  Page                 : TWizardPage;
  BackgroundBitmapImage: TBitmapImage;
  s: string;
begin
 Page := CreateCustomPage(wpWelcome, 'Custom Page', 'Test');
 ExtractTemporaryFile('background.bmp');
 s:=ExpandConstant('{tmp}')+'\background.bmp';
 BackgroundBitmapImage := TBitmapImage.Create(Page);
 BackgroundBitmapImage.Bitmap.LoadFromFile(s);
 BackgroundBitmapImage.Parent := Page.Surface;
 BackgroundBitmapImage.Align:=alCLient;
 BackgroundBitmapImage.Stretch:=True; 
end;

答案 1 :(得分:0)

非常吵。 您必须将图像分成近3个

for WizardForm.MainPanel ( top strip of 60px)
for WizardForm.InnerPage (Center panel around Surface)
for mainPage.Surface (Inside inner Panel)

这是一个精确切割的重要词汇......