I wonder how can i accomplish the following:
I would like to display the progress of a progressbar on the taskbar while my window is minimized. See here for a visual description.
See how the icon on the taskbar gradually fills with green color following the main progressbar in the window?
Could someone tell me how to do that?
Update:
I downloaded windows api code pack and referenced it in my project and wrote the following code but nothing happens when i run my app increment the pbar and minimize:
private void updatepbar()
{
tpb.Value = progressBar1.Value;
}
timer1.Tick += new EventHandler(delegate { updatepbar(); });
timer1.Interval = 1000;
timer1.Start();
What am i doing wrong? thanks alot
Taskbar.ProgressBar.State =
(TaskbarButtonProgressState)Enum.Parse(
typeof(TaskbarButtonProgressState),
(string)comboBoxProgressBarStates.SelectedItem);
if (Taskbar.ProgressBar.State != TaskbarButtonProgressState.Indeterminate)
Taskbar.ProgressBar.CurrentValue = progressBar1.Value;