Inno Setup: Background image during the installation |
|
Написал Ярослав Гасов
|
01.12.2009 |
[Setup] AppName=background AppVerName=background DefaultDirName={pf}\background DefaultGroupName=background OutputDir=C:\Output Compression=lzma SolidCompression=no WindowVisible=no
[Files] Source: "Background.bmp"; DestDir: "{tmp}"; Flags: dontcopy
[Code] function GetSystemMetrics(nIndex:Integer):Integer; external '
Этот адрес e-mail защищен от спам-ботов. Чтобы увидеть его, у Вас должен быть включен Java-Script
stdcall';
procedure InitializeWizard(); var width,height: Integer; BackgroundBitmapImage: TBitmapImage; s: string; begin ExtractTemporaryFile('background.bmp'); s:=ExpandConstant('{tmp}')+'\background.bmp'; WizardForm.Position:=poScreenCenter; MainForm.BORDERSTYLE:=bsNone; width:=GetSystemMetrics(0); height:=GetSystemMetrics(1); MainForm.Width:=width; MainForm.Height:=height; width:=MainForm.ClientWidth; height:=MainForm.ClientHeight; MainForm.Left := 0; MainForm.Top := 0;
BackgroundBitmapImage := TBitmapImage.Create(MainForm); BackgroundBitmapImage.Bitmap.LoadFromFile(s); BackgroundBitmapImage.Align := alClient; BackgroundBitmapImage.Parent := MainForm; BackgroundBitmapImage.Stretch:=True; MainForm.Visible:=True; end;
|