
cProgressWindow
Windows provides a simple interface that allows you to use an asychronous Explorer-style progress dialog with just a few lines of code. So I thought I'd wrap up this functionality in a class to make it a bit easier to use, especially with automating checking for cancel, raising an event for it, and closing the dialog.
It's all pretty self-explanatory... the class comes with a demo project that shows usage of the most basic options, and the class itself implements all the functionality (except setting an animation, because that's only supported in XP).
Requirements
Windows XP or newer
oleexp.tlb, any version (or olelib)
Future Work
If you're working with files, you may want the more detailed progress window that you get with IFileOperation and Explorer in Windows 7... you can manually control such a progress dialog in a manner similar to this one with another interface supported by the same ProgressDialog object, IOperationsProgressDialog. You can then use it like this or as the custom dialog from IFileOperation.SetProgressDialog.
I'll be putting up a demo of using that interface in a few days, but if you wanted to experiment in the mean time, all the definitions are already in oleexp (but this one isn't XP compatible and not present in olelib), and you can create an instance of it via
Code:
Dim cProg As IOperationsProgressDialog
Set cProg = New ProgressDialog