In Chapter 5 (page 74) of Professional Windows 7 Development Guide you find an example showing how to use the progress bar. In this example, you discover how to set the progress bar state, start the progress bar, pause it, and reset it. Each of these actions changes the display of the progress bar on the Taskbar (as described on the bottom of page 75). Displaying the progress bar on the Taskbar is really helpful because it can let the user check the status of a task quickly, without actually displaying the application.
Microsoft’s theories are often nice, but several readers have written to tell me that this technology can’t possibly work in a real world application. Reader skepticism is healthy and I always welcome it because it forces me to think. So, I spent a good deal of time thinking about and researching this particular Windows 7 feature.
You won’t find the progress bar shown on the Taskbar for any Microsoft product that I’m aware of (if anyone knows of one, please do write me at John@JohnMuellerBooks.com). However, I did find one real world product so far that does indeed use the new Windows 7 progress bar—Internet Download Manager. As you download a file from online, you see it’s progress on the Taskbar. I must admit, the feature works great. However, this product appears to use only the normal status state. For example, pausing doesn’t appear to turn the Taskbar presentation yellow (at least, it didn’t for me). Still, it’s a real world example if you want to see one. I’d be interested in hearing about other real world examples that I can share in my blog because real world products often demonstrate how to use a particular feature better than any example.
Several readers also jumped immediately to Chapter 5 and didn’t read any of the preceding material. This particular problem happens all of the time. I’m guilty of jumping myself at times and missing out on something important. They wrote to complain that the example won’t compile. You need to download and install the Windows API Code Pack for the Microsoft .NET Framework. The instructions for doing this appear on page 46 of the book. Make absolutely certain that you download and install all of the required software, including the .NET Framework 4.0 (described in Chapter 3) before you attempt to use the examples in the book.
I also had one reader ask about a version of these examples that will run under Mono. So far I haven’t been successful in creating such an example. I’m not actually sure why you’d want to create such an example (and the reader didn’t respond to additional queries on my part). If someone wants to discuss Mono in more detail with me, please be sure to write. You can read my latest update on Mono in my An Update About Mono post. In the meantime, please keep those skeptical e-mails coming 8).