Pregunta

When you right-click the Skype icon in the taskbar while Skype is running, it has a little group in the "CloseWindow" popup thing titled Tasks, which contains options to sign out or quit Skype.

enter image description here

How would I go about doing this in C#? Thanks.

¿Fue útil?

Solución

You need to use Microsofts Windows API Code Pack. For an example on the exact way to implement it in your case, this tutorial will guide you through all the steps! The tutorial will show you how to do make the same thing Skype and windows media player use very quickly.

Hope this helps!

Otros consejos

I answered a similar question here:

This feature is called a JumpList and is for Windows 7. It is part of the Microsoft API. How to use this with C# has been documented thoroughly here and here.

In order to be able to deal with Jumplist classes in Windows Forms, you'd have to include these DLLs (Microsoft.WindowsAPICodePack.dll and Microsoft.WindowsAPICodePack.Shell.dll) in your project. You can get them from this CodeProject project or you can download the Open source library from WindowsAPICodePack which includes the source code that can be used to access Windows 7 and Windows Vista features. You will need to add two usings at the top of your code:

using Microsoft.WindowsAPICodePack.Taskbar;
using Microsoft.WindowsAPICodePack.Shell;

Any Jumplist consists of categories and each category has its own Jumptasks. There are two types of Jumptasks supported till now by WindowsAPICodePack; the JumplistLink and JumplistSeperator. A Jumptask represents an action to be performed by the user like openning a new instance of the application or launching another program. These Jumptasks are grouped in categories called JumplistCustomCategories.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top