Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [Setup]
- AppName=My Program
- AppVersion=1.5
- DefaultDirName=My Program
- [Files]
- ; this will make the bitmap you want to show part of the setup
- ; but only for time when the installer runs; it won't be copied
- ; elsewhere than to the installer's temporary folder
- Source: "C:\Users\MostDeviantAsiedu\Desktop\setup\Logo.bmp"; DestDir: "{tmp}"; Flags: dontcopy
- [Code]
- var
- WelcomePageID: Integer;
- BitmapImage: TBitmapImage;
- procedure InitializeWizard;
- var
- WelcomePage: TWizardPage;
- begin
- WelcomePage := CreateCustomPage(wpWelcome, '', '');
- WelcomePageID := WelcomePage.ID;
- BitmapImage := TBitmapImage.Create(WizardForm);
- // this will extract the included Logo.bmp file from the [Files] section
- // to the Inno Setup temporary folder
- ExtractTemporaryFile('Logo.bmp');
- // the ExpandConstant('{tmp}\Logo.bmp') line will expand path to that
- // temporary file extracted before
- BitmapImage.Bitmap.LoadFromFile(ExpandConstant('{tmp}\Logo.bmp'));
- BitmapImage.Top := 0;
- BitmapImage.Left := 0;
- BitmapImage.AutoSize := True;
- BitmapImage.Cursor := crHand;
- BitmapImage.Visible := False;
- BitmapImage.Parent := WizardForm.InnerPage;
- end;
- procedure CurPageChanged(CurPageID: Integer);
- begin
- BitmapImage.Visible := CurPageID = WelcomePageID;
- WizardForm.Bevel1.Visible := CurPageID <> WelcomePageID;
- WizardForm.MainPanel.Visible := CurPageID <> WelcomePageID;
- WizardForm.InnerNotebook.Visible := CurPageID <> WelcomePageID;
- end;
Advertisement
Add Comment
Please, Sign In to add comment