Support Forums
[VB.Net] Progress bar in the icon in the taskbar [Win7] - Printable Version

+- Support Forums (https://www.supportforums.net)
+-- Forum: Categories (https://www.supportforums.net/forumdisplay.php?fid=87)
+--- Forum: Coding Support Forums (https://www.supportforums.net/forumdisplay.php?fid=18)
+---- Forum: Visual Basic and the .NET Framework (https://www.supportforums.net/forumdisplay.php?fid=19)
+---- Thread: [VB.Net] Progress bar in the icon in the taskbar [Win7] (/showthread.php?tid=19258)

Pages: 1 2


[VB.Net] Progress bar in the icon in the taskbar [Win7] - The-One - 06-03-2011

Hello,

Google Chrome is using it to, thats why I found it interesting when I saw it.

[Image: 13060742500.png]

The .dll's: http://www.multiupload.com/FDKNSPL53Y

Step 1
Add the .dll's as reference.

Step 2
Import the following element: Microsoft.WindowsAPICodePack.Taskbar

Step 3
I'm using it on colors, but the dll comes with a standard Enum this is mine:

Code:
Enum ProgressState
  Green = 0
  Red = 4
  Yellow = 8
    End Enum

Step 4
Create a button, timer, thread or what ever you want it to do, and use the following code.

Code:
TaskbarManager.Instance.SetProgressState(ProgressState.Green)

or, if you want to use the dll's Enum:
Code:
TaskbarManager.Instance.SetProgressState(TaskbarProgressBarState.NoProgress)

Step 5
You can simple make the value of the progress bar go up by doing:

Code:
TaskbarManager.Instance.SetProgressValue(Value, MaxValue)

You can check if the user's OS is supported by doing:

Code:
If TaskbarManager.IsPlatformSupported Then
    'Do new stuff here
  End If

Enjoy! Pirate


RE: [VB.Net] Progress bar in the icon in the taskbar [Win7] - Wolf - 06-03-2011

Pretty nice, always needed this! Thanks mate Smile


RE: [VB.Net] Progress bar in the icon in the taskbar [Win7] - The-One - 06-04-2011

(06-03-2011, 10:10 AM)Wolf Wrote: Pretty nice, always needed this! Thanks mate Smile

Thanks, welcome to SupportForums btw.


RE: [VB.Net] Progress bar in the icon in the taskbar [Win7] - Richie - 06-04-2011

That's pretty nice man, thanks. I might start learning VB.net

Quick question, can you change the colours?


RE: [VB.Net] Progress bar in the icon in the taskbar [Win7] - The-One - 06-04-2011

(06-04-2011, 04:53 AM)Richie Wrote: That's pretty nice man, thanks. I might start learning VB.net

Quick question, can you change the colours?

Yes:

Code:
Enum ProgressState
  Green = 0
  Red = 4
  Yellow = 8
    End Enum

So use ProgressState.<green/red/yellow>

There might be more, I just went to 12 then I found it enough Roflmao


RE: [VB.Net] Progress bar in the icon in the taskbar [Win7] - Inventor - 06-04-2011

Thanks, I have been wanting this.

Inventor1


RE: [VB.Net] Progress bar in the icon in the taskbar [Win7] - Laughynose - 06-04-2011

This is actually quite a nice release, I've always wondered how Google Chrome produced such a cool loading bar! I'll defiantly +1 you if I had the ability, thanks for share!


RE: [VB.Net] Progress bar in the icon in the taskbar [Win7] - The-One - 06-04-2011

(06-04-2011, 08:54 AM)Laughynose Wrote: This is actually quite a nice release, I've always wondered how Google Chrome produced such a cool loading bar! I'll defiantly +1 you if I had the ability, thanks for share!

Thanks, no problem man! You have 9 posts to go Tongue gogo.

(06-04-2011, 08:53 AM)Inventor1 Wrote: Thanks, I have been wanting this.

Inventor1

Thanks for replying.


RE: [VB.Net] Progress bar in the icon in the taskbar [Win7] - L0C4LH0ST - 06-17-2011

Cool mate! going to use this in my progress bar applications!


RE: [VB.Net] Progress bar in the icon in the taskbar [Win7] - PURP - 06-17-2011

This is pretty cool thanks a lot.