If I may be so bold as to suggest a somewhat more solid approach to your enum values sir.

On form initialization do:

 

comboBox1.DataSource =

Enum.GetValues(typeof(TaskbarButtonProgressState));

 

and then on the selectedindexchanged of your combobox do:

 

 

Taskbar

.ProgressBar.State = (TaskbarButtonProgressState)comboBox1.SelectedValue;

 

 

The only real difference being that future changes to this enum, which normally would not be under my direct change control, would not cause the code to be rewritten or revisited in any way other than recompile with new referenced assemblies or projects.

It's also faster and safer to code (than human typed strings, assuming you are human). 


Just as a way to avoid erring. Which I personally at least do enough of.

 

Nice introductory tutorial to the taskbar, and works like a charm. Pity the resolution even in high wma/wmv doesnt allow one to see the actual code really well.