Support Forums

Full Version: [VB.Net] Adding JumpListItems to your application [Win7]
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

Okay so as you know I fooled around with the new WindowsAPI dll.s.

[Image: 1306145749-10.png]

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

Step 1
Add the .dll's as reference.

Step 2
Import the following elements: Microsoft.WindowsAPICodePack.Taskbar and Microsoft.WindowsAPICodePack.Shell

Step 3
Next, add a new 'JumpList'

Code:
Dim j As JumpList = JumpList.CreateJumpList()

Step 4
Now lets add a few programs:

Code:
Dim cat_1 As New JumpListCustomCategory("Editors")
  cat_1.AddJumpListItems(New JumpListLink("mspaint.exe", "Paint") With {.IconReference = New IconReference("mspaint.exe", 0)})
  cat_1.AddJumpListItems(New JumpListLink("notepad.exe", "Notepad") With {.IconReference = New IconReference("notepad.exe", 0)})
  j.AddCustomCategories(cat_1)

This will add two programs (Notepad and Paint) credits to Helmy.m for the IconReference thing.

Step 5
You can also add sites:

Code:
Dim cat_2 As New JumpListCustomCategory("Websites")
  cat_2.AddJumpListItems(New JumpListLink("http://www.hackforums.net/", "HackForums"))
  cat_2.AddJumpListItems(New JumpListLink("http://www.donate-me.com/", "Donate"))
  j.AddCustomCategories(cat_2)

Step 6
When you run it, you will notice it doesn't work. This is because we have to refresh the JumpList.

Code:
j.Refresh()

You can remove them by doing:
Code:
j.ClearAllUserTasks()

NOTE: Where I type in the website and the exe's you can also enter a path to a specific program.

EnjoyPirate!
Thanks, I needed this!
Can you make this start when a program starts?

Inventor1

(06-04-2011, 09:16 AM)Inventor1 Wrote: [ -> ]Thanks, I needed this!
Can you make this start when a program starts?

Inventor1

Yes, just put in it Form#.Load
Thanks!

Inventor1