Background image during the installation

From ISXKB

Revision as of 09:35, 12 July 2007 by Markus (Talk | contribs)
(diff) ←Older revision | Current revision (diff) | Newer revision→ (diff)
Jump to: navigation, search
This article is currently work in progress. You can help to improve the ISXKB by extending this article.


[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 'GetSystemMetrics@user32.dll 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;
Personal tools
Ads: