Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [Setup]
- AppName=My Program
- AppVersion=1.5
- DefaultDirName={pf}\My Program
- [Code]
- var
- ProgressPage: TOutputProgressWizardPage;
- procedure InitializeWizard;
- begin
- ProgressPage := CreateOutputProgressPage('Caption', 'Description');
- end;
- procedure CurStepChanged(CurStep: TSetupStep);
- var
- I: Integer;
- begin
- if CurStep = ssPostInstall then
- begin
- // set some initial messages
- ProgressPage.SetText('Message 1', 'Message 2');
- // you have to set here max to a non-zero value to show the progress bar; I chose 100, but
- // it doesn't matter for marquee style progress bar
- ProgressPage.SetProgress(0, 100);
- // set the marquee style
- ProgressPage.ProgressBar.Style := npbstMarquee;
- // show the progress page
- ProgressPage.Show;
- try
- // here put your code to execute - note it must not be blocking, otherwise the progress
- // bar won't have a chance to repaint itself; you can also update the labels by calling
- // SetText method to report what is currently happening if your code to execute has more
- // stages
- finally
- ProgressPage.Hide;
- end;
- end;
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement