TLama

Untitled

Sep 29th, 2013
254
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.46 KB | None | 0 0
  1. [Setup]
  2. AppName=My Program
  3. AppVersion=1.5
  4. DefaultDirName=My Program
  5.  
  6. [Files]
  7. ; this will make the bitmap you want to show part of the setup
  8. ; but only for time when the installer runs; it won't be copied
  9. ; elsewhere than to the installer's temporary folder
  10. Source: "C:\Users\MostDeviantAsiedu\Desktop\setup\Logo.bmp"; DestDir: "{tmp}"; Flags: dontcopy
  11.  
  12. [Code]
  13. var
  14. WelcomePageID: Integer;
  15. BitmapImage: TBitmapImage;
  16.  
  17. procedure InitializeWizard;
  18. var
  19. WelcomePage: TWizardPage;
  20. begin
  21. WelcomePage := CreateCustomPage(wpWelcome, '', '');
  22. WelcomePageID := WelcomePage.ID;
  23. BitmapImage := TBitmapImage.Create(WizardForm);
  24. // this will extract the included Logo.bmp file from the [Files] section
  25. // to the Inno Setup temporary folder
  26. ExtractTemporaryFile('Logo.bmp');
  27. // the ExpandConstant('{tmp}\Logo.bmp') line will expand path to that
  28. // temporary file extracted before
  29. BitmapImage.Bitmap.LoadFromFile(ExpandConstant('{tmp}\Logo.bmp'));
  30. BitmapImage.Top := 0;
  31. BitmapImage.Left := 0;
  32. BitmapImage.AutoSize := True;
  33. BitmapImage.Cursor := crHand;
  34. BitmapImage.Visible := False;
  35. BitmapImage.Parent := WizardForm.InnerPage;
  36. end;
  37.  
  38. procedure CurPageChanged(CurPageID: Integer);
  39. begin
  40. BitmapImage.Visible := CurPageID = WelcomePageID;
  41. WizardForm.Bevel1.Visible := CurPageID <> WelcomePageID;
  42. WizardForm.MainPanel.Visible := CurPageID <> WelcomePageID;
  43. WizardForm.InnerNotebook.Visible := CurPageID <> WelcomePageID;
  44. end;
Advertisement
Add Comment
Please, Sign In to add comment