开发者

Building C#/.NET Apps that Use Windows 7 TaskBar Features

The new Windows 7 taskbar features, like jump lists, previews, etc. are really cool, and I want to allow my C# ap开发者_JAVA技巧plications to use them. I have two questions:

First of all, how can I use these functions (in general)? I found two articles by Microsoft about this, but I'm not really sure what to do. Could you provide links to a library, as well as some sample code?

Next, let's say that I figure out how to use these Taskbar functions. My question is, is there some built-in way of checking whether the OS is Windows 7, and thus enabling the taskbar functions? If I didn't have this logic in my app, would it have problems if it was run on a non-Win7 machine?

Thanks!


In the first article you link to there is a sample library that you can download that makes use of the new Windows 7 features.

This article shows how to check the version of Windows your application is running on.

As always, if you call an API that isn't in existence, then yes, your app will experience some turbulence. Remember, it's (almost) always better to check for a condition and act accordingly once (as in application startup) than to try something over and over in code and catch exceptions.


Windows API Code Pack for .NET Framework is your one stop shop for a ton of .NET API for Windows programming, including Taskbar. This library gives you a complete API set to work with Windows 7 Taskbar and then some. It also includes samples for WPF, and Winform.

Another good source for Windows 7 content is the Windows Team Blog

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜