Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[VB.Net] Adding ThumbnailToolbarButtons to your application [Win7]
#1
Hey,

So I found Microsoft.WindowsAPICodePack.dll online and I started screwing with it. I found that you can add ThumbnailToolbarButtons to your process, just like WMP has.

This is what we are aiming for:

[Image: 1306067083-330.png]

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

Okay i'm not going to tell every basic crap, I assume you know something about VB before doing this.

Step 1
Add the .dll's as reference.

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

Step 3
Declare the buttons you want, I did three(to show you guys how to add more then one button with only ONE line).

Code:
Dim WithEvents ttb_1 As New ThumbnailToolbarButton(Me.Icon, "Black Background")
    Dim WithEvents ttb_2 As New ThumbnailToolbarButton(Me.Icon, "White Background")
    Dim WithEvents ttb_3 As New ThumbnailToolbarButton(Me.Icon, "MessageBox")

Step 4
Next, add the code which will add the buttons:

Code:
Dim arr(0 To 2) As ThumbnailToolbarButton
  arr(0) = ttb_1
  arr(1) = ttb_2
  arr(2) = ttb_3
  TaskbarManager.Instance.ThumbnailToolbars.AddButtons(Me.Handle, arr)

This will add all three buttons to your application, but now, how can we make it execute something on a click?

Step 5

Add this code:

Code:
Sub ttb_1_click() Handles ttb_1.Click

    End Sub

If change:

Code:
Handles ttb_1.Click

to

Code:
Handles ttb_2.Click

It will execute only when the 2nd button is clicked.
Now you can add your code.

Enjoy Pirate
Reply
#2
Looks pretty cool. Thanks for sharing.
Reply
#3
(06-03-2011, 10:38 AM)KoBE Wrote: Looks pretty cool. Thanks for sharing.

No problem man, thanks for replying.
Reply
#4
Rather nice, thanks!

Inventor1
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Application Organiser lhcrulz 3 2,714 02-11-2012, 08:56 PM
Last Post: AceInfinity
  [PREVIEW] updatr - Easy Application Updater Virtuous 9 4,571 11-21-2011, 11:05 AM
Last Post: Virtuous
  [Vb.net] How To Make Your vb.net application nice loocking. [TUT] CodingWorm 3 6,319 10-14-2011, 01:31 AM
Last Post: Digital-Punk
  [VB.NET] - Integrate Flash Into Your Application - [TUT] Fragma 14 6,821 10-12-2011, 03:16 AM
Last Post: Philippines
  cegonsoft india | Learn console application In Dot net | Vb.net MikeHenery9 0 2,360 09-09-2011, 04:01 AM
Last Post: MikeHenery9

Forum Jump:


Users browsing this thread: 2 Guest(s)