This new feature is adds a great value for users, because now one does not need to keep the program visible to see the progress of any process (Report, web service call, download etc…) This feature is implemented already at least in the Internet Explorer 8 (Windows 7 version) and the file explorer (copying/moving).
Using the Windows7APICodepack to implement this feature is very easy and fast task. Here’s an example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using Microsoft.WindowsAPICodePack.Taskbar; namespace TestingStuffOut { public partial class Form1 : Form { Timer timer; int value; public Form1() { InitializeComponent(); timer = new Timer(); timer.Enabled = true; timer.Interval = 250; timer.Tick += new EventHandler(timer_Tick); timer.Start(); progressBar1.Style = ProgressBarStyle.Blocks; progressBar1.Minimum = 0; progressBar1.Maximum = 100; progressBar1.Step = 1; value = 0; } void timer_Tick(object sender, EventArgs e) { // Reset the counter when it reaches maximum if (value == progressBar1.Maximum) value = 0; else value += 10; progressBar1.Value = value; // Here's the Taskbar Progressbar part TaskbarManager.Instance.SetProgressState(TaskbarProgressBarState.Normal); TaskbarManager.Instance.SetProgressValue(progressBar1.Value, progressBar1.Maximum); } } } |
And the example looks like this:

Normal mode

Error mode

Paused mode
There was also a indeterminate mode (continuous), but I did not have time to test it also (means, I did not get it to work after one try and it’s very late
)
Be sure to check out other parts of the “Testing It Out” series from the series starting page!