I found it was a really useful introduction to the use of Closures. I have tried to follow the style of the original as much as possible, and the test begins by illustrating unchanged behaviour with the three standard examples. The Overall progress bar is activated by calling ProgressBar.Overall(intMax) which works like a property.
Additional features I incorporated are:
1) Access to the Clock so at the end you can say something like
ProgressBar.Close()
fhMessageBox(“You have done it all!\n\n” .. TimeTaken: “ .. ProgressBar.TimeTaken())
2) Optional independent setting of button text.
3) Optional fixed Info Text line – not flashing past as an activity indicator but conveying very little real info. It also not overloading the heading
4) Simple single call Tick() which combines Message(“Foo”) and Step(1)
5) “Damping” of the progress bar means after reaching 100% it can be about half a second before the bar catches up and hits the buffers. I therefore introduced a half second delay releasing every 0.05 seconds to smooth it. After all, simply by incorporating a progress bar you are saying I am happy for my program to run a bit slower.