Advertisement
TLama

Untitled

Oct 30th, 2014
579
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Delphi 1.13 KB | None | 0 0
  1. [Setup]
  2. AppName=My Program
  3. AppVersion=1.5
  4. DefaultDirName={pf}\My Program
  5.  
  6. [Code]
  7. var
  8.   ProgressPage: TOutputProgressWizardPage;
  9.  
  10. procedure InitializeWizard;
  11. begin
  12.   ProgressPage := CreateOutputProgressPage('Caption', 'Description');
  13. end;
  14.  
  15. procedure CurStepChanged(CurStep: TSetupStep);
  16. var
  17.   I: Integer;
  18. begin
  19.   if CurStep = ssPostInstall then
  20.   begin
  21.     // set some initial messages
  22.     ProgressPage.SetText('Message 1', 'Message 2');
  23.     // you have to set here max to a non-zero value to show the progress bar; I chose 100, but
  24.     // it doesn't matter for marquee style progress bar
  25.     ProgressPage.SetProgress(0, 100);
  26.     // set the marquee style
  27.     ProgressPage.ProgressBar.Style := npbstMarquee;
  28.     // show the progress page
  29.     ProgressPage.Show;
  30.     try
  31.       // here put your code to execute - note it must not be blocking, otherwise the progress
  32.       // bar won't have a chance to repaint itself; you can also update the labels by calling
  33.       // SetText method to report what is currently happening if your code to execute has more
  34.       // stages
  35.     finally
  36.       ProgressPage.Hide;
  37.     end;
  38.   end;
  39. end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement