Create Win 7 Jump Lists w MS API Code Pack - codeguru.com

Status
Not open for further replies.

office politics

It's all just 1s and 0s
Messages
6,555
Location
in the lab
Creating Windows 7 Jump Lists With The API Code Pack and Visual Studio 2008 — CodeGuru.com

Creating Windows 7 Jump Lists With The API Code Pack and Visual Studio 2008
Rating: none

Jani Järvinen (view profile)
December 15, 2009


Introduction
Now that Windows 7 is readily available at every computer store, it's only a matter of time until the new operating system becomes mainstream in both homes and corporations. Especially this will happen once new computers start replacing old ones.


(continued)

From a developer perspective, Windows 7 brings many possibilities. One of the most visible and prominent new features is the improved taskbar, through which applications are launched and even managed. In this article, the focus is on a feature called jump lists, which can be thought of as being a mini Start menu when right-clicking an icon on the taskbar (Figure 1).

Figure 1. A basic jump list.

Jump lists are active both when right-clicking an icon on the taskbar, but also when pointing at an application icon in the Start menu's initial view (Figure 2). Thus, there are two ways to make jump lists visible; however these menus have a different focus: jump lists on the Start menu are about the recent documents, whereas the taskbar-activated jump list contains more options to manage the application and its windows.

Figure 2. Jump lists in the Start menu.

Programming both instances of jump lists requires only a single implementation. Under the hood, jump lists use a COM based API, just like many other features in the Windows shell. Although it is possible to access these COM interfaces directly from your application, there is an easier way. Microsoft has developed a free package for .NET developers called the Windows API Code Pack (Figure 3), which contains many ready-made classes to access Windows features, such as Windows 7's jump lists.

Figure 3. The Windows API Code Pack download page.

Next, you are going to see how you can use Visual Studio 2008 and C# to enable custom jump lists in your own .NET applications with a WinForms sample application (Figure 4). A similar method could be used with Visual Studio 2010 Beta 2. With Visual Studio 2010 however, you can also use WPF 4.0's new support for Windows 7 shell integration. Even so, these classes are out the scope of this article, but the topic will likely be addressed in the near future.

this article continues with a code tutorial.
 
Status
Not open for further replies.
Back
Top Bottom