Thursday, August 5, 2010

Change Style of the Program Icon in the Taskbar

The previous post was about displaying a progressbar in the taskbar, in this post I want to show the use of a similiar function, which is also new in Windows 7.
From Windows 7 on not only a progressbar can be shown, but the program icons can also provide information about the state of the prorgram. Most useful I think are the 2 stati "Error" and "No Response", the following code shows the use of those (like in the previous post described, the Windows API Code Pack is required):

TaskbarManager tm = TaskbarManager.Instance;

If above code is run, the program signals an error, the icon is painted slightly red.

As well the program state can be declared as "frozen", then a green bar moves over the icon, which probably a lot of you know:

TaskbarManager tm = TaskbarManager.Instance;

No comments:

Post a Comment