【发布时间】:2010-09-08 07:40:50
【问题描述】:
为什么我的位图不是全屏尺寸?
BitmapImage1 := TBitmapImage.Create(Page);
INNO 不知怎么变小了?
【问题讨论】:
标签: inno-setup
为什么我的位图不是全屏尺寸?
BitmapImage1 := TBitmapImage.Create(Page);
INNO 不知怎么变小了?
【问题讨论】:
标签: inno-setup
Tom,您必须设置 Parent、Align 和 Stretch 属性才能用您的图像填充自定义页面的背景。
试试这个代码
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;
【讨论】:
做起来很麻烦。 您必须将您的图像分成近 3 块
for WizardForm.MainPanel ( top strip of 60px)
for WizardForm.InnerPage (Center panel around Surface)
for mainPage.Surface (Inside inner Panel)
精密切割的大工程也是如此......
【讨论】: