Jun 19, 2014 06:30 AM
Hello Community,
Introduction
Spoiler (Click to View)
Do you always wanted to make something like this:
![[Image: f78422e1a46499fe023bfbc5a2e421ab.png]](https://i.gyazo.com/f78422e1a46499fe023bfbc5a2e421ab.png)
![[Image: 9aab8210e0674b6cf1c05135a71b277c.png]](https://i.gyazo.com/9aab8210e0674b6cf1c05135a71b277c.png)
Well I wanted to do it aswell and after some research I found the solution and I am going to share it with you!
Preperation
Spoiler (Click to View)
We need these 2 .dll files, download them and a reference to your project!
Then Import the TaskBar and the Shell Class. I have imported the Reflection and IO Class aswell, because we need them.
JumpList
Spoiler (Click to View)
The JumpList is basically the ContextMenu of the TaskBar, but with less features. It is still available, when the application is not ran.
So in this sample we will create a Link to a new Application Instance.
How it will look:
![[Image: 3aaef40d18a6cc8c87e8ff185c6d3242.png]](https://i.gyazo.com/3aaef40d18a6cc8c87e8ff185c6d3242.png)
You can create as many of this items as you want.
![[Image: e5b8613d53e3b1a37841df2bf4f400ff.png]](https://i.gyazo.com/e5b8613d53e3b1a37841df2bf4f400ff.png)
You can also add a Seperator for a better overview:
![[Image: d48e4882d503eb5092214b71833108d4.png]](https://i.gyazo.com/d48e4882d503eb5092214b71833108d4.png)
As you might notice all these items will be put under the "Aufgaben" or "Tasks", if you want to give that a costum name you need to create a new JumpListCustomCategory.
![[Image: 7023281489a1877ce8bc43cf1146a999.png]](https://i.gyazo.com/7023281489a1877ce8bc43cf1146a999.png)
Thumbnail Buttons
Spoiler (Click to View)
With Thumbnail Buttons those little buttons at the bottom are meant.
![[Image: 95cf0d345ba452df731279290ce8ec94.png]](https://i.gyazo.com/95cf0d345ba452df731279290ce8ec94.png)
You can only add 7 Buttons, but that should be enough though.
![[Image: da8622d08f97d660c9c1778dea58e03e.png]](https://i.gyazo.com/da8622d08f97d660c9c1778dea58e03e.png)
Thumbnail Clip
Spoiler (Click to View)
You can change the region that will be shown as Thumbnail with this easy code:
NOTE: Since it needs the handle you can perfom this with any external application aswell.
Taskbar Progress
Spoiler (Click to View)
Well you can also make the litte rectangle in your Taskbar act like a progressbar. This is easy aswell:
It has different states to either make the progressbar color green, red or yellow, depending on abortion, pause etc.
![[Image: 86432d722b009a482de4537cea390e7c.png]](https://i.gyazo.com/86432d722b009a482de4537cea390e7c.png)
![[Image: 9e8f7b5c63a2af1fd5684309aaeeb7ba.png]](https://i.gyazo.com/9e8f7b5c63a2af1fd5684309aaeeb7ba.png)
![[Image: 3d0c076dc049737c95a2e7e16c44c443.png]](https://i.gyazo.com/3d0c076dc049737c95a2e7e16c44c443.png)
Taskbar Overlay Icon
Spoiler (Click to View)
In my eyes this is completely useless, but check it out yourself.
What it does:
--> ![[Image: f1548d65cc284912c4200b4a094b5178.png]](https://i.gyazo.com/f1548d65cc284912c4200b4a094b5178.png)
Code for this:
I hope this Tutorial helped some people and please leave a post, it took me much time to find out how this works and then compile the Thread!
Introduction
Spoiler (Click to View)
Do you always wanted to make something like this:
![[Image: f78422e1a46499fe023bfbc5a2e421ab.png]](https://i.gyazo.com/f78422e1a46499fe023bfbc5a2e421ab.png)
![[Image: 9aab8210e0674b6cf1c05135a71b277c.png]](https://i.gyazo.com/9aab8210e0674b6cf1c05135a71b277c.png)
Well I wanted to do it aswell and after some research I found the solution and I am going to share it with you!
Preperation
Spoiler (Click to View)
We need these 2 .dll files, download them and a reference to your project!
Then Import the TaskBar and the Shell Class. I have imported the Reflection and IO Class aswell, because we need them.
Code
Imports Microsoft.WindowsAPICodePack.Taskbar
Imports Microsoft.WindowsAPICodePack.Shell
Imports System.Reflection
Imports System.IOJumpList
Spoiler (Click to View)
The JumpList is basically the ContextMenu of the TaskBar, but with less features. It is still available, when the application is not ran.
So in this sample we will create a Link to a new Application Instance.
Code
Private Sub Form1_Shown(sender As Object, e As EventArgs) Handles Me.Shown
Dim jplst As JumpList = JumpList.CreateJumpList()
jplst.ClearAllUserTasks()
Dim TaskLink As JumpListLink = New JumpListLink(Assembly.GetEntryAssembly().Location, "Create new Instance")
TaskLink.IconReference = New IconReference(Assembly.GetEntryAssembly().Location, 0)
jplst.AddUserTasks(TaskLink)How it will look:
![[Image: 3aaef40d18a6cc8c87e8ff185c6d3242.png]](https://i.gyazo.com/3aaef40d18a6cc8c87e8ff185c6d3242.png)
You can create as many of this items as you want.
![[Image: e5b8613d53e3b1a37841df2bf4f400ff.png]](https://i.gyazo.com/e5b8613d53e3b1a37841df2bf4f400ff.png)
You can also add a Seperator for a better overview:
Code
Dim sep As JumpListTask = New JumpListSeparator()
jplst.AddUserTasks(sep)![[Image: d48e4882d503eb5092214b71833108d4.png]](https://i.gyazo.com/d48e4882d503eb5092214b71833108d4.png)
As you might notice all these items will be put under the "Aufgaben" or "Tasks", if you want to give that a costum name you need to create a new JumpListCustomCategory.
Code
Dim category As JumpListCustomCategory = New JumpListCustomCategory("System Utilities")
Dim calculator As JumpListLink = New JumpListLink(Path.Combine(Environment.SystemDirectory, "calc.exe"), "Calculator")
calculator.IconReference = New IconReference(Path.Combine(Environment.SystemDirectory, "calc.exe"), 0)
category.AddJumpListItems(calculator)
jplst.AddCustomCategories(category)
jplst.Refresh()![[Image: 7023281489a1877ce8bc43cf1146a999.png]](https://i.gyazo.com/7023281489a1877ce8bc43cf1146a999.png)
Thumbnail Buttons
Spoiler (Click to View)
With Thumbnail Buttons those little buttons at the bottom are meant.
![[Image: 95cf0d345ba452df731279290ce8ec94.png]](https://i.gyazo.com/95cf0d345ba452df731279290ce8ec94.png)
You can only add 7 Buttons, but that should be enough though.
Code
Dim button As ThumbnailToolBarButton = New ThumbnailToolBarButton(New Icon("skype.ico", 16, 16), "Open Skype")
TaskbarManager.Instance.ThumbnailToolBars.AddButtons(Me.Handle, button)
AddHandler button.Click, AddressOf button_clickCode
Sub button_click()
'Any Code Here
End Sub![[Image: da8622d08f97d660c9c1778dea58e03e.png]](https://i.gyazo.com/da8622d08f97d660c9c1778dea58e03e.png)
Thumbnail Clip
Spoiler (Click to View)
You can change the region that will be shown as Thumbnail with this easy code:
Code
TaskbarManager.Instance.TabbedThumbnail.SetThumbnailClip(Me.Handle, New Rectangle(0, 0, 50, 50))NOTE: Since it needs the handle you can perfom this with any external application aswell.
Taskbar Progress
Spoiler (Click to View)
Well you can also make the litte rectangle in your Taskbar act like a progressbar. This is easy aswell:
Code
Dim tbm As TaskbarManager = TaskbarManager.Instance
tbm.SetProgressValue(50, 100, Me.Handle)
tbm.SetProgressState(TaskbarProgressBarState.Normal)It has different states to either make the progressbar color green, red or yellow, depending on abortion, pause etc.
![[Image: 86432d722b009a482de4537cea390e7c.png]](https://i.gyazo.com/86432d722b009a482de4537cea390e7c.png)
![[Image: 9e8f7b5c63a2af1fd5684309aaeeb7ba.png]](https://i.gyazo.com/9e8f7b5c63a2af1fd5684309aaeeb7ba.png)
![[Image: 3d0c076dc049737c95a2e7e16c44c443.png]](https://i.gyazo.com/3d0c076dc049737c95a2e7e16c44c443.png)
Taskbar Overlay Icon
Spoiler (Click to View)
In my eyes this is completely useless, but check it out yourself.
What it does:
--> ![[Image: f1548d65cc284912c4200b4a094b5178.png]](https://i.gyazo.com/f1548d65cc284912c4200b4a094b5178.png)
Code for this:
Code
tbm.SetOverlayIcon(New Icon("C:\Users\Paul\Pictures\Germany.ico"), "")I hope this Tutorial helped some people and please leave a post, it took me much time to find out how this works and then compile the Thread!
