<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://windowsteamblog.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Windows 7 for Developers : Taskbar</title><link>http://windowsteamblog.com/blogs/developers/archive/tags/Taskbar/default.aspx</link><description>Tags: Taskbar</description><dc:language>en</dc:language><generator>CommunityServer 2008 SP1 (Build: 30619.63)</generator><item><title>Fishbowl for Facebook Using the Windows 7 Taskbar for Extra Spice</title><link>http://windowsteamblog.com/blogs/developers/archive/2009/11/19/fishbowl-for-facebook-using-the-windows-7-taskbar-for-extra-spice.aspx</link><pubDate>Fri, 20 Nov 2009 01:41:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:529030</guid><dc:creator>Yochay Kiriaty</dc:creator><slash:comments>19</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://windowsteamblog.com/blogs/developers/rsscomments.aspx?PostID=529030</wfw:commentRss><comments>http://windowsteamblog.com/blogs/developers/archive/2009/11/19/fishbowl-for-facebook-using-the-windows-7-taskbar-for-extra-spice.aspx#comments</comments><description>&lt;p&gt;During Wednesday&amp;rsquo;s keynote, Brian Goldfarb demoed an amazing&amp;nbsp;Silverlight 4 client for Facebook. Beyond its amazing looks,&amp;nbsp;this Silverlight 4&amp;nbsp;demo&amp;nbsp;provides a full and complete desktop client application for Windows (and Mac). SilverFace is built on top of Silverlight 4 &amp;ndash; also announced during the keynote. If you want a cool Facebook client application to work on from your Windows desktop, you should take a look&amp;nbsp;at the&amp;nbsp;&lt;a href="http://www.fishbowlclient.com/"&gt;&lt;strong&gt;Fishbowl for Facebook Preview&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;. &lt;/strong&gt;Fishbowl is a great WPF application that you can install and enjoy as a user, and at the same time it is a&amp;nbsp;great code sample for developers whom are looking to write&amp;nbsp;WPF applications that use Windows 7 features.&amp;nbsp; If you are interested, you can &lt;a href="http://fishbowl.codeplex.com/"&gt;download the source code for Fishbowl&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In today's world, the client&amp;rsquo;s experience is more important than ever before. Your application doesn&amp;rsquo;t just have to be fun and interesting; it has to be good looking, polished, and functional, providing a &amp;ldquo;natural&amp;rdquo; user experience that just works. As a developer, you need to push the envelope and use any available technical tool that the OS provides or any other available means (if installed on mobile devices) to provide a superior user experience, or users will switch to the next guy. In such a competitive scenario, using the Windows 7 Taskbar to shave a few seconds from day-to-day tasks looks like a very obvious choice.&lt;/p&gt;
&lt;p&gt;Both Silverlight 4 demo and Fishbowl applications each provide a great UX and enhance user productivity. Scott Guthrie also announced the &lt;a href="http://msdn.microsoft.com/en-us/windows/ee388574.aspx"&gt;Facebook SDK&lt;/a&gt; for managed code applications that combines the latest in Web and Client platform innovations with leading Social technologies (services) to help developers plug into Facebook. But, beside the new Facebook SDK and beside the great looks, the Fishbowl application is a great WPF (3.5) example that demonstrates how to write applications that produce amazing experiences on Windows 7.&lt;/p&gt;
&lt;p&gt;As a WPF application, Fishbowl runs on multiple Windows versions, including Windows XP, Windows Vista, and Windows 7, and it integrates with the Windows 7 Taskbar and Multitouch. One of the main ideas behind the Taskbar is to provide users with quick and easy access to their content and help them accomplish tasks and navigate between windows easier and with more confidence. For example, JumpList provides a great tool for surfacing common work items and tasks. If you have a task that you perform once or twice a day, taking two or three clicks to perform the task is not that bad. However, if you have a task that you perform 10, 20, or even 30 more times, using JumpList tasks or items in the recent category list goes a long way. Facebook users often check their wall, write notifications and messages, view friends' pictures, and so on. Therefore, in some scenarios, the Taskbar JumpList tasks, icon notification, thumbnail buttons, and other functionality become major tools in the application. &lt;/p&gt;
&lt;p&gt;Fishbowl uses the taskbar to provide a quick, easy, and seamless integration with Facebook functionality directly from your Taskbar. Let&amp;rsquo;s review some of the user functionality before jumping into code behind. &lt;/p&gt;
&lt;table width="551" cellpadding="2" cellspacing="0" border="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td width="265" valign="top"&gt;The Fishbowl taskbar offers a few tasks even before you start your application. You can go to Facebook.com, or you can actually &amp;ldquo;jump&amp;rdquo; directly and see your wall, friend's picture, and more, as the following image shows. &lt;br /&gt;One of the amazing things in Fishbowl for Facebook is that it changes it functionality between the different modes of the application. Being able to use the taskbar differently for&lt;/td&gt;
&lt;td width="284" valign="top"&gt;&lt;a href="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/developers/TaskbarBeforeStart_5F00_119ECE9E.png"&gt;&lt;img height="229" width="240" src="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/developers/TaskbarBeforeStart_5F00_thumb_5F00_57AF8BB1.png" alt="TaskbarBeforeStart" border="0" title="TaskbarBeforeStart" style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" /&gt;&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;different scenarios provides an amazing user experience in heavily used application like Fishbowl.&lt;/p&gt;
&lt;p&gt;When Fishbowl runs in normal mode, the Taskbar JumpList reflects items and tasks that you can actually perform in the context of a running application, like viewing the last few notifications and messages that you received without opening the application, as shown by the following image.&lt;/p&gt;
&lt;table width="551" cellpadding="2" cellspacing="0" border="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td width="225" valign="top"&gt;&lt;a href="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/developers/TaskbarAfterStart_5F00_6C052B6F.png"&gt;&lt;img height="265" width="164" src="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/developers/TaskbarAfterStart_5F00_thumb_5F00_191A183E.png" alt="TaskbarAfterStart" border="0" title="TaskbarAfterStart" style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" /&gt;&lt;/a&gt; &lt;/td&gt;
&lt;td width="324" valign="top"&gt;If you hover with the mouse above the Fishbowl control, you see the thumbnail preview provided by Windows 7 taskbar. However, Fishbowl uses the thumbnail button again allowing you to both view a preview of the application and act immediately upon the thumbnail preview as shown in the following image.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;If you hover with the mouse above the Fishbowl control, you see the thumbnail preview provided by Windows 7 taskbar. However, Fishbowl uses the thumbnail button again allowing you to both view a preview of the application and act immediately upon the thumbnail preview as shown in the following image.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/developers/thumbnailbutton_5F00_1CB8331B.png"&gt;&lt;img height="445" width="472" src="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/developers/thumbnailbutton_5F00_thumb_5F00_1E58D922.png" alt="thumbnail button" border="0" title="thumbnail button" style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;(And thank you Raman for writing so many PDC tweets J)&lt;/p&gt;
&lt;p&gt;Fishbowl also has a mini-mode operation mode. This mode shows just one message in a small window. As you can see in the following image, a small arrow allows you to switch between messages. When you hover over Fishbowl taskbar icon, you can see the preview but you can also control the message, again using the taskbar thumbnail preview.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;a href="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/developers/minimode_5F00_7A7001C7.png"&gt;&lt;img height="447" width="545" src="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/developers/minimode_5F00_thumb_5F00_36D850A5.png" alt="minimode" border="0" title="minimode" style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Besides great Taskbar integration, Fishbowl offers a great Multitouch experience, allowing you to scroll between messages using your finger to touch the touch screen. It is a little hard to illustrate Multitouch with screen capture so you will have to trust me on this one. &lt;/p&gt;
&lt;p&gt;We've covered most of the Fishbowl features unique to Windows 7, and in the next post I will dive into the API that enabled these Taskbar and Multitouch features. If you are interested, you can &lt;a href="http://fishbowl.codeplex.com/"&gt;download the source code for Fishbowl&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://windowsteamblog.com/aggbug.aspx?PostID=529030" width="1" height="1"&gt;</description><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Windows+7/default.aspx">Windows 7</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Developers/default.aspx">Developers</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Microsoft/default.aspx">Microsoft</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Windows/default.aspx">Windows</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Multi-Touch/default.aspx">Multi-Touch</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Taskbar/default.aspx">Taskbar</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/.NET/default.aspx">.NET</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Sample+Code/default.aspx">Sample Code</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/PDC09/default.aspx">PDC09</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/PDC2009/default.aspx">PDC2009</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Windows+API+Code+Pack/default.aspx">Windows API Code Pack</category></item><item><title>New Windows API Code Pack Version</title><link>http://windowsteamblog.com/blogs/developers/archive/2009/11/18/new-windows-api-code-pack-version.aspx</link><pubDate>Thu, 19 Nov 2009 00:02:42 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:528968</guid><dc:creator>Yochay Kiriaty</dc:creator><slash:comments>5</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://windowsteamblog.com/blogs/developers/rsscomments.aspx?PostID=528968</wfw:commentRss><comments>http://windowsteamblog.com/blogs/developers/archive/2009/11/18/new-windows-api-code-pack-version.aspx#comments</comments><description>&lt;p&gt;I am glad to announce that today we shipped a new version of the &lt;a href="http://code.msdn.microsoft.com/WindowsAPICodePack"&gt;Windows API Code Pack&lt;/a&gt; – version 1.0.1. This is not a major version with a lot of new features, but rather a minor version focused on fixing bugs, improving performance, adding demos and few features updates (new wrappers…) &lt;/p&gt;  &lt;p&gt;But before we dive into this new version of the Windows Code Pack let’s better understand what this Windows API Code Pack is all about. &lt;/p&gt;  &lt;p&gt;Windows 7 offers new features like the taskbar, libraries, and the Sensor and Location platform, to name a few. These features enable new scenarios and create new opportunities for developers to make their applications shine on Windows 7. All these great features are exposed via the Win32 native API. Currently there is no “Windows 7” namespace in the .NET Framework, and no easy way to use these features from managed code applications. To help managed code developers access them, we released version 1.0 of the Windows API Code Pack for the .NET Framework in August (just after Windows 7 RTM). &lt;/p&gt;  &lt;p&gt;The Windows API Code Pack &lt;b&gt;is&lt;/b&gt; a &lt;b&gt;free&lt;/b&gt;, managed&lt;b&gt; Source Code Library &lt;/b&gt;provided by Microsoft &lt;b&gt;as is&lt;/b&gt;. You should consider this library as if &lt;b&gt;you wrote it yourself&lt;/b&gt;, as if it &lt;b&gt;is your own code&lt;/b&gt;. It is a great starting point and provides a really good and solid solution for managed code developers. It covers a lot of the new Windows 7 features as well as some more fundamental core features from the Windows Vista timeframe. You may think of the Windows API Code Pack as the closest thing to an “official” managed API for Windows. But you need to remember that it’s not a product with 24x7 technical support available from Microsoft Customer Service and Support. We believe it is a great solution, and that the codebase is very solid and high quality. &lt;/p&gt;  &lt;p&gt;Our goal with the code pack is to enable managed code developers to take advantage of Windows APIs that are not part of the .NET Framework. We feel that as a shared source that is separate from the .NET runtime libraries, the Windows API Code Pack provides an optimal compromise between the Microsoft Win32 managed wrapper, short time-to-market -we released the Windows API Code Pack just a month after the Win7 RTM, and we ship full source code of the library.&lt;/p&gt;  &lt;p&gt;The Windows API Code Pack includes a great deal of managed API for Windows (7). For example:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Extensive integration with the Windows Shell namespace, with support for the Windows Shell property system, providing control like explorer browser and access to Windows Libraries &lt;/li&gt;    &lt;li&gt;A completely 100% feature parity with the native Taskbar API including (but not limited to) JumpLists, Icon Overlay, Progress bar, Thumbnail, custom switcher, Thumbnail Button, etc… &lt;/li&gt;    &lt;li&gt;Windows Task Dialogs , other controls &lt;/li&gt;    &lt;li&gt;Support for Direct3D 11.0 and DXGI 1.0/1.1 APIs &lt;/li&gt;    &lt;li&gt;Support for the Sensor Platform APIs &lt;/li&gt;    &lt;li&gt;Extended Linguistic Services APIs &lt;/li&gt;    &lt;li&gt;Windows Restart Manager &lt;/li&gt;    &lt;li&gt;Power APIs &lt;/li&gt;    &lt;li&gt;And many other features &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Each technology represented in the Windows API Code Pack has multiple demos and examples (including source) in C# and VB. We are planning on releasing updates to the Windows API Code Pack roughly every three months. We will be investing mainly in stability (meaning fixing bugs), fundamentals, testing and documentation, as well as new feature support (based on customer feedback).&lt;/p&gt;  &lt;p&gt;You may ask yourself, “&lt;b&gt;Why isn't the Windows API Code Pack part of the .NET Framework?&lt;/b&gt;” &lt;/p&gt;  &lt;p&gt;We ship open source code that we might bring into the runtime sometime in the future, if we feel it's sufficiently core to the entire framework to be worth the size increase. Remember the .NET Framework runs on both Windows Vista and Windows XP. However, Windows 7 is here now, and we want to enable you to access this set of free, open source library sooner rather than later. We’re shipping this library in a community-supported form and, as you can see, we intend to keep updating it. While this version (1.0.1) is a minor release, we are planning on another release in the next few months. In the meantime, you get the best of both worlds in a package that you can use as a whole or in parts without restriction.&lt;/p&gt;  &lt;p&gt;Another question you may ask is, “&lt;b&gt;Will .NET 4 replace the need to use the Windows API Code pack&lt;/b&gt;?”&lt;/p&gt;  &lt;p&gt;When .NET 4 ships, you will be able to use its Windows 7 features such as Taskbar and multitouch integration with WPF, DirectWrite support, and the location API via the Devices namespace. Continue to access other features such as libraries, Restart Manager, and Sensors via the Windows API Code Pack. &lt;/p&gt;  &lt;p&gt;Last but not least, we are looking for feedback from the community – that is you the .NET developer using this library to write managed code applications for Windows 7. On the &lt;a href="http://code.msdn.microsoft.com/WindowsAPICodePack"&gt;Windows API Code Pack site&lt;/a&gt;, you can ask questions, provide feedback, report bugs, and follow open bugs. Your input is critical for the continuation of this library, so please send us your feedback and questions. &lt;/p&gt;  &lt;p&gt;To learn more about how to use the Windows API Code Pack check the &lt;a href="http://channel9.msdn.com/learn/courses/Windows7/" target="_blank"&gt;Windows 7 Training on Channel 9&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://windowsteamblog.com/aggbug.aspx?PostID=528968" width="1" height="1"&gt;</description><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Microsoft/default.aspx">Microsoft</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Windows/default.aspx">Windows</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Taskbar/default.aspx">Taskbar</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Sensor+and+Location/default.aspx">Sensor and Location</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Libraries/default.aspx">Libraries</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/.NET/default.aspx">.NET</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Sample+Code/default.aspx">Sample Code</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Windows+API+Code+Pack/default.aspx">Windows API Code Pack</category></item><item><title>Programming Windows 7 Using Visual Studio 2010</title><link>http://windowsteamblog.com/blogs/developers/archive/2009/11/17/programming-windows-7-using-visual-studio-2010.aspx</link><pubDate>Wed, 18 Nov 2009 01:55:24 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:528861</guid><dc:creator>Yochay Kiriaty</dc:creator><slash:comments>9</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://windowsteamblog.com/blogs/developers/rsscomments.aspx?PostID=528861</wfw:commentRss><comments>http://windowsteamblog.com/blogs/developers/archive/2009/11/17/programming-windows-7-using-visual-studio-2010.aspx#comments</comments><description>&lt;table border="0" cellspacing="0" cellpadding="2" width="561"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="350"&gt;         &lt;p&gt;A few weeks ago, just two days before Windows 7 become generally available, Visual Studio 2010 hit its own major milestone with the release its second Community Technical Preview of Visual Studio, known as Visual Studio 2010 Beta 2. To me, it is always exciting to see how the different tools and frameworks evolve and add new features.&amp;#160; It seems that with every release the products get bigger and better, offering an even &lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="209"&gt;         &lt;br /&gt;          &lt;br /&gt;&lt;a href="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/developers/VSLogo_5F00_4635271E.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; margin: 0px 0px 0px 20px; display: inline; border-top: 0px; border-right: 0px" title="VSLogo" border="0" alt="VSLogo" src="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/developers/VSLogo_5F00_thumb_5F00_1E8EAAF4.png" width="220" height="165" /&gt;&lt;/a&gt; &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;greater number of programming&amp;#160; languages, and addressing an ever growing number of areas of development such as Web, client, mobile, parallel, consoles, and devices.&lt;/p&gt;  &lt;p&gt;Despite being a “beta” product, it is much easier to work with Visual Studio 2010 than with VS 2008. It is much easier to control your solutions and, even more importantly, much easier to write and document code. The user interface is much improved; it uses the Windows Presentation Foundation (WPF) to reduce clutter and visual complexity, and modernizes the interface by removing outdated 3D bevels. Using WPF enables us to help developers focus on content areas by opening up negative space between windows and drawing attention to the current focus with a dominant accent color and a distinctive background. There are also some cool, small, and simple perks like the ability to control the size of text. You can also drag a single window from the main Visual studio application to a second monitor (just like that) and with that you have multi-monitor support via the VS client application.&lt;/p&gt;  &lt;p&gt;Improvements to the IntelliSense allow it finally to work well for C++ projects. And let’s not forget the new debugger window that supports parallel computing debugging and lets you view your parallel stacks. &lt;/p&gt;  &lt;p&gt;There is even a new language, F# (F stands for Functional programming), and numerous upgrades to C#, like support for dynamic keywords. Dynamic objects' operations are resolved at runtime (check out a &lt;a href="http://www.hanselman.com/blog/C4AndTheDynamicKeywordWhirlwindTourAroundNET4AndVisualStudio2010Beta1.aspx"&gt;good post&lt;/a&gt; about this by Scott Hanselman). There is also support for the next version of the C++ language specification, C++X0, like Lambda Expressions. Speaking of C++, we've built the C++ solutions using MSBuild, which should make everyone happy.&lt;/p&gt;  &lt;p&gt;As always, backward compatibility is super critical, and it is important to mention that Visual Studio 2010 supports multi-targeting. Visual Studio 2010 can target .NET 2.0 through .NET 4.0 on a per-project basis, which means you can work with your older project on the new VS 2010 and enjoy all the goodies mentioned above (and many more).&lt;/p&gt;  &lt;p&gt;But I want to focus this post on using Visual Studio 2010 to program Windows 7. There are quite few technologies and features in Visual Studio 2010 to help you write better applications targeting the specific features of Windows 7. Below are just a few of the Visual Studio 2010 features that we’ll write more about really soon. &lt;/p&gt;  &lt;p&gt;&lt;b&gt;.NET 4 and Windows 7&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;Visual Studio 2010 brings a complete new CLR version – version 4. This is not just an incremental upgrade on top of CLR 2 (.NET Framework 2). This enables new language enhancements like the dynamic keyword. And the new WPF brings support in a few other areas like shell and Taskbar integration, and multitouch. &lt;/p&gt;  &lt;p&gt;&lt;b&gt;WPF &amp;amp; Taskbar Integration &lt;/b&gt;&lt;/p&gt;  &lt;p&gt;As you know, you program jump lists using the &lt;b&gt;JumpList&lt;/b&gt; class. This exposes several methods and properties that manipulate the exposed jump lists for the application. It also has an attached property that you can apply to your application class to create, modify, and remove jump list items. If you work with specific files, you can use the JumpList.AddToRecentCategory method to add that file to the recently used file list managed by the shell.&lt;/p&gt;  &lt;p&gt;There are two types of jump lists – &lt;i&gt;tasks&lt;/i&gt; and &lt;i&gt;items&lt;/i&gt;; you work with each using a &lt;b&gt;JumpTask&lt;/b&gt;, or a &lt;b&gt;JumpPath&lt;/b&gt; respectively. You can work with these in XAML, code-behind, or a combination of the two. The following code snippet shows a simple integration of tasks into a jump list.&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;JumpList.JumpList&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
   &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;JumpList&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;JumpTask&lt;/span&gt; &lt;span class="attr"&gt;ApplicationPath&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;notepad.exe&amp;quot;&lt;/span&gt; 
                         &lt;span class="attr"&gt;CustomCategory&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;External Tools&amp;quot;&lt;/span&gt; 
                &lt;span class="attr"&gt;Description&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Take Notes&amp;quot;&lt;/span&gt; 
                &lt;span class="attr"&gt;Title&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Start Notepad&amp;quot;&lt;/span&gt; 
                &lt;span class="attr"&gt;IconResourcePath&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;notepad.exe&amp;quot;&lt;/span&gt; 
                &lt;span class="attr"&gt;IconResourceIndex&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;0&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;

      &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;JumpTask&lt;/span&gt; &lt;span class="attr"&gt;ApplicationPath&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;calc.exe&amp;quot;&lt;/span&gt;
                         &lt;span class="attr"&gt;CustomCategory&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;External Tools&amp;quot;&lt;/span&gt; 
                         &lt;span class="attr"&gt;Description&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Perform some calculations&amp;quot;&lt;/span&gt; 
                        &lt;span class="attr"&gt;Title&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Start Calculator&amp;quot;&lt;/span&gt;
                        &lt;span class="attr"&gt;IconResourcePath&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;calc.exe&amp;quot;&lt;/span&gt; 
                        &lt;span class="attr"&gt;IconResourceIndex&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;0&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;JumpList&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;JumpList.JumpList&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;p&gt;In a similar way, you can use XAML to add Thumbnail Toolbar buttons as shown by the following code snippet.&lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;TaskbarItemInfo.ThumbButtonInfos&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
   &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ThumbButtonInfo&lt;/span&gt; &lt;span class="attr"&gt;DismissWhenClicked&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;True&amp;quot;&lt;/span&gt; 
                    &lt;span class="attr"&gt;ImageSource&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;images/booktrip.png&amp;quot;&lt;/span&gt;
                    &lt;span class="attr"&gt;Command&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;{Binding BookItinerary}&amp;quot;&lt;/span&gt;
                    &lt;span class="attr"&gt;Description&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Book the itinerary now&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;TaskbarItemInfo.ThumbButtonInfos&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;b&gt;WPF Common File Dialog Supports Libraries (Finally!)&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;For some strange reason, WPF 3 and 3.5 Common File Dialog (CFD) didn’t support the updated version of the CFD introduced with Windows Vista. The CFD was upgraded in Windows 7 to support libraries and provide a better user experience. It now allows seamless search integration as well as some advanced user functionality. With WPF 4, applications enjoy the power of the “new” CFD directly from WPF, and don’t need to import CFD from the WinForm namespace (which was the only way to show the updated CFD from WPF 3 and WPF 3.5).&lt;/p&gt;

&lt;p&gt;&lt;b&gt;WPF Supports Multitouch&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;WPF 4.0 introduces multitouch support directly into the WPF API– with no need to interop to a native service. These new features are only available on Windows 7 and are automatically deprecated when running under older operating systems, so you don’t have to detect the operating system yourself. WPF 4.0 adds a new manipulation API to the UIElement base class. This new support allows developers to track multiple touches and generate both cumulative and individual manipulations across the touches. Basically, this enables you to transform your object on the X and Y coordinates, rotation, and scale. &lt;/p&gt;

&lt;p&gt;WPF will supply these manipulation events if the &lt;b&gt;IsManipulationEnabled&lt;/b&gt; property on the element is set to true. It defaults to false, so you will need to turn on this property for each element where you want to manage manipulations. This is as simple as adding IsManipulationEnabled=true to your XAML as shown in the following code snippet. &lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Border&lt;/span&gt; &lt;span class="attr"&gt;Margin&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;10,5&amp;quot;&lt;/span&gt; 
    &lt;span class="attr"&gt;BorderBrush&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;DarkGoldenrod&amp;quot;&lt;/span&gt; 
    &lt;span class="attr"&gt;BorderThickness&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;2&amp;quot;&lt;/span&gt; 
        &lt;span class="attr"&gt;CornerRadius&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;10&amp;quot;&lt;/span&gt; 
    &lt;span class="attr"&gt;MinHeight&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;75&amp;quot;&lt;/span&gt; 
    &lt;span class="attr"&gt;IsManipulationEnabled&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;true&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;Optionally, you can also hook the &lt;b&gt;ManipulationStarting&lt;/b&gt; and &lt;b&gt;ManipulationCompleted&lt;/b&gt; events to provide code behind the implementation of these events. &lt;/p&gt;

&lt;p&gt;WPF 4 also supports low-level touch messages, or raw touch input. You can interact with the raw touch events on any &lt;b&gt;UIElement&lt;/b&gt; using &lt;b&gt;TouchDown&lt;/b&gt;, &lt;b&gt;TouchMove,&lt;/b&gt; and &lt;b&gt;TouchUp&lt;/b&gt; events, all of which have preview event versions. This can be useful if you are trying to track multiple touches that are not manipulating the same object, or if you want to provide different behavior for touches and the mouse. We’ll soon write more about Windows 7 multitouch in general and WPF specifically. &lt;/p&gt;

&lt;p&gt;&lt;b&gt;MFC Updates&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;In Visual Studio 2010, C++ and MFC received a healthy dosage of “coolness” factor, adding useful features such as IntelliSense enhancements and C++0x features. The MFC Library received a major upgrade, especially in regard to the Taskbar, Multitouch, and Restart and Recovery:&lt;/p&gt;

&lt;p&gt;&lt;b&gt;&lt;i&gt;Taskbar&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;The MFC Taskbar provides all the functionality that the native taskbar COM API provides. There is nothing that the one can do that the other cannot. The MFC simply wraps the Win32 APIs (as it always does) into a more “MFC-like” API that corresponds to the MFC Framework programming style guidelines. For example, the following code snippet sets the overlay icon.&lt;/p&gt;

&lt;pre class="csharpcode"&gt;CMainFrame* mainFrm = 
dynamic_cast&amp;lt;CMainFrame*&amp;gt;(AfxGetApp()-&amp;gt;GetMainWnd());
&lt;span class="kwrd"&gt;if&lt;/span&gt; (mainFrm)
    mainFrm-&amp;gt;SetTaskbarOverlayIcon(IDI_ICON_INFO,L&lt;span class="str"&gt;&amp;quot;Info&amp;quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;p&gt;First you need to obtain a handle (a pointer) to the application's main window (the top-level window), which corresponds to Win32 HWND. Then, simply call the SetTaskbarOverlayIcon passing HICON and a string that provides an alt text version of the information conveyed by the overlay to meet accessibility requirements. Simple, right?&lt;/p&gt;

&lt;p&gt;In MFC, the CFrameWnd class provides the functionality of a Windows single document interface (SDI), overlapped, or pop-up frame window. With the new MFC, this class was updated and now supports Taskbar functionality such as icon overlay, progress bar, jump lists, and thumbnails. &lt;/p&gt;

&lt;p&gt;In MFC, Taskbar thumbnail preview support is built in, so the Taskbar thumbnails will show any rendering within the views. Therefore, other than implementing your own View drawing, you need not provide any explicit code to update those Thumbnails.&lt;/p&gt;

&lt;p&gt;To enable Taskbar Thumbnails in an MFC application while using the MFC application wizard, all the user needs to do is select the “Multiple documents” application type with the option “Tabbed documents” enabled. When the application runs, MFC will take a snapshot of each view and send it to the Taskbar APIs to display as thumbnails.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/developers/image_5F00_5D36703E.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/developers/image_5F00_thumb_5F00_1508B462.png" width="535" height="422" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;And the output could like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/developers/image_5F00_13C41B83.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/developers/image_5F00_thumb_5F00_58FC72AC.png" width="339" height="350" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;&lt;b&gt;&lt;i&gt;Multitouch&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;In Visual Studio 2010, MFC also supports multitouch. By default, on a touch-enabled device (such as touch screen), Windows 7 sends gesture touch messages to any application; that is, by default Windows 7 sends WM_GESTURE messages to the target windows. All that MFC is doing is mapping these messages to its own message handlers. MFC provides a number of message handler overrides that can receive each of the gesture types, and each returns a Boolean value. If a gesture input is processed by the application, the corresponding override should return TRUE; otherwise, it returns FALSE. Therefore if you wish to handle the zoom gestures, all you need to do is implement the relevant handler. Here is the list of supported handlers.&lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="rem"&gt;// Gesture handlers&lt;/span&gt;
&lt;span class="kwrd"&gt;virtual&lt;/span&gt; BOOL OnGestureZoom(CPoint ptCenter, &lt;span class="kwrd"&gt;long&lt;/span&gt; lDelta);
&lt;span class="kwrd"&gt;virtual&lt;/span&gt; BOOL OnGesturePan(CPoint ptFrom, CPoint ptTo);
&lt;span class="kwrd"&gt;virtual&lt;/span&gt; BOOL OnGestureRotate(CPoint ptCenter, &lt;span class="kwrd"&gt;double&lt;/span&gt; dblAngle);
&lt;span class="kwrd"&gt;virtual&lt;/span&gt; BOOL OnGesturePressAndTap(CPoint ptFirstFinger, &lt;span class="kwrd"&gt;long&lt;/span&gt; lDelta);
&lt;span class="kwrd"&gt;virtual&lt;/span&gt; BOOL OnGestureTwoFingerTap(CPoint ptCenter);&lt;/pre&gt;
&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;Similarly, you can register to receive raw touch messages and the default gesture messages. In Windows 7, gestures messages and raw touch are mutually exclusive. If you register to receive the raw touch messages for a particular window, that window will stop receiving gestures messages. If you opt-in to handle raw touch messages, you need to implement the following handler:&lt;/p&gt;
&lt;span class="kwrd"&gt;&lt;/span&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;virtual&lt;/span&gt; BOOL OnTouchInput(
                        CPoint pt, 
                        &lt;span class="kwrd"&gt;int&lt;/span&gt; nInputNumber, 
                        &lt;span class="kwrd"&gt;int&lt;/span&gt; nInputsCount, 
                        PTOUCHINPUT pInput);&lt;/pre&gt;
&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;p&gt;MFC makes your life easier by providing a lot of the information per each touch point, for example, the client coordinates for the actual point where the touch-enabled device has been touched. MFC also provides the ID of the touch point, that is, the first, second, or third finger, as well as the total count of current touches.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;&lt;i&gt;Restart and Recovery &lt;/i&gt;(&lt;i&gt;Restart Manager&lt;/i&gt;)&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;In Visual Studio 2010, MFC also provides native support of the Restart Manager. Restart Manager is a feature introduced by the Microsoft Windows Vista operating system. It can help applications maintain their data when an update needs to shutdown the application or when an unexpected software error or crash occurs. Instead of shutting down abnormally, Restart Manager enables an application to perform an application save before it is terminated. Furthermore, it can re-invoke the application, enabling it to restore its state from before the shutdown or crash. &lt;/p&gt;

&lt;p&gt;For new MFC applications, you can get the application restart and recovery feature for free by using the MFC Application Wizard as you can see from the following image:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/developers/clip_5F00_image001_5F00_5DFEB05B.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image001" border="0" alt="clip_image001" src="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/developers/clip_5F00_image001_5F00_thumb_5F00_76221AB6.png" width="425" height="243" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;All configurable parts of the restart manager API are exposed to the user through virtual members that can be over-ridden. Needless to say, you can expect some more blogging about this feature. &lt;/p&gt;

&lt;p&gt;&lt;b&gt;.NET 4 and Location&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;.NET 4 has a new Device namespace that supports the Windows 7 Location API (part of the Windows 7 Sensor and Location. The &lt;b&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/system.device.location(VS.100).aspx"&gt;System.Device.Location&lt;/a&gt;&lt;/b&gt; namespace allows application developers to access the user's location easily using a single API. Location information may come from multiple providers, such as GPS, Wi-Fi triangulation, and cell phone tower triangulation. The System.Device.Location classes provide a single API to encapsulate the multiple location providers on a computer and support seamless prioritization and transitioning between them. An application developer using this API does not need to know which location-sensing technologies are available on a particular computer and is freed from the burden of tailoring an application to a specific hardware configuration.&lt;/p&gt;

&lt;p&gt;To begin accessing location, you need to create a &lt;b&gt;GeoLocationProvider&lt;/b&gt;. This object is the main “location manager” object through which you can register for &lt;b&gt;LocationChange&lt;/b&gt; notifications and synchronously read the latest location information. Next you need to call &lt;b&gt;Start&lt;/b&gt; to start the acquisition of data from the current location provider. You can check the &lt;b&gt;Status&lt;/b&gt; property to determine if data is available. If data is available, you can get the location once from the &lt;b&gt;Location&lt;/b&gt; property, or receive continuous location updates using the &lt;b&gt;LocationChanged&lt;/b&gt; event. The following code snippet is a VERY simple code sample showing how to retrieve the current GeoCoordinates (latitude, longitude). &lt;/p&gt;
&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;pre class="csharpcode"&gt;GeoLocationProvider provider = &lt;span class="kwrd"&gt;new&lt;/span&gt; GeoLocationProvider();
provider.Start();
GeoCoordinate coordinate = provider.Location.Coordinate;
&lt;span class="kwrd"&gt;if&lt;/span&gt; (coordinate != GeoCoordinate.Unknown)
{
  &lt;span class="rem"&gt;//Business logic here&lt;/span&gt;
}&lt;/pre&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;Unfortunately, .NET 4 supports only the Location API and not the full Sensor and Location Platform – meaning that the .NET location implementation is still missing the Sensor piece. Use the Windows API Code Pack to access sensor from managed code.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Parallel Computing and Windows 7 Multi-Core &lt;/b&gt;&lt;/p&gt;

&lt;p&gt;Parallel programming in Visual Studio 2010 has many aspects, for example, Parallel LINQ and other .NET enhancements for supporting parallel computing, including statements like Parallel.For that use System.Threading.Tasks.Task. C++ developers will be happy to learn that the Task concepts also exist in C++ Version 10, which ships with VS 2010. For native code, Concurrency Runtime (ConcRT) has &lt;b&gt;implicit knowledge&lt;/b&gt; of &lt;a href="http://blogs.msdn.com/nativeconcurrency/archive/2009/02/04/concurrency-runtime-and-windows-7.aspx"&gt;&lt;b&gt;Win7 processor groups&lt;/b&gt;&lt;/a&gt; and will schedule work on up to 256 cores; ConcRT also takes advantage of User Mode Scheduling of threads. Therefore, any workload that sits on top of ConcRT immediately benefits. In other words, because both the Parellel Pattern Library (PPL) and Asynchronous Agents are included in Visual C++ 10 CRT and are built on top of ConcRT, any workloads you build on them will scale to 256 cores--&lt;/p&gt;

&lt;p&gt;just like that! (Well, you will still need to write the code, but the scaling is free.)&lt;/p&gt;

&lt;p&gt;For managed code applications, the story is less bright. Management of the managed stack thread sits on top of the .NET ThreadPool (System.Threading.ThreadPool) by default. This does not use the new processor group APIs in Windows 7, and therefore doesn’t automatically benefit from the Windows 7 ability to scale. The maximum number of processes that the threadpool can utilize is 64. But not everything is lost, it is possible to write a custom TaskScheduler that targeted more than 64 procs, and use the rest of the Task Parallel Library with &lt;b&gt;that special scheduler. This would be a cool CodePlex project, right?&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;Overall Visual Studio 2010 includes tons of new technologies and improvements--all of it icing on the Windows 7 cake! &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://windowsteamblog.com/aggbug.aspx?PostID=528861" width="1" height="1"&gt;</description><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Windows+7/default.aspx">Windows 7</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Developers/default.aspx">Developers</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Microsoft/default.aspx">Microsoft</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Windows/default.aspx">Windows</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Multi-Touch/default.aspx">Multi-Touch</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Taskbar/default.aspx">Taskbar</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Sensor+and+Location/default.aspx">Sensor and Location</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/.NET/default.aspx">.NET</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Visual+Studio+2010/default.aspx">Visual Studio 2010</category></item><item><title>Windows 7 At PDC09</title><link>http://windowsteamblog.com/blogs/developers/archive/2009/10/08/windows-7-at-pdc09.aspx</link><pubDate>Thu, 08 Oct 2009 17:08:26 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:526314</guid><dc:creator>Yochay Kiriaty</dc:creator><slash:comments>18</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://windowsteamblog.com/blogs/developers/rsscomments.aspx?PostID=526314</wfw:commentRss><comments>http://windowsteamblog.com/blogs/developers/archive/2009/10/08/windows-7-at-pdc09.aspx#comments</comments><description>&lt;p&gt;The Professional Developers Conference (PDC) is the one event that all developers who use any Microsoft technologies must attend at least once in their professional careers. It’s the flagship event for developers, offering the most comprehensive, future-looking, technically deep, densely-packed set of sessions from Microsoft speakers you can find anywhere. This &lt;a href="http://microsoftpdc.com/"&gt;year’s PDC&lt;/a&gt; is no exception and you can expect it to be a very exciting event.&lt;/p&gt;  &lt;table border="0" cellspacing="0" cellpadding="20" width="556"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="419"&gt;         &lt;p&gt;My first PDC was PDC08, held last November at the LA Convention Center. As one of the people at Microsoft who work on Windows 7, I was fortunate enough to be in the loop regarding Windows 7 @ PDC08, and was able to contribute (even if only in a small way) to one of the keynote. During the Day 2 keynote, &lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="135"&gt;&lt;a href="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/developers/image_5F00_0410E73D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="image" border="0" alt="image" src="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/developers/image_5F00_thumb_5F00_554B2E9A.png" width="140" height="87" /&gt;&lt;/a&gt; &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;Steven Sinofsky presented Windows 7 to the world and for the first time people outside of Microsoft saw the new Taskbar, the Windows Ribbon, and witnessed a live multitouch demo. Attendees received a 160G hard drive (makes you wonder what they'll get this year…) with Windows 7 build 6800 (does anyone remember this build number?). The Windows team presented a lot of its technologies in a series of impressive sessions. And since then, through the different versions of Windows--Beta, RC, and RTM--we continued to push new content to help developers ramp up and get ready for Windows 7.&lt;/p&gt;  &lt;p&gt;Windows 7 will become “Generally Available” (GA) to the public on October 22&lt;sup&gt;nd&lt;/sup&gt;, exactly two weeks from today, and this year’s PDC takes place right after Windows 7 GA. With the pre-release veil of secrecy lifted, during this year's PDC we can dive deep (very deep) into Windows 7 to extend our understanding of how Windows 7 works and, even more importantly, how developers can take advantage of all the great new improvements and features Windows 7 has to offer. &lt;/p&gt;  &lt;p&gt;To start with, on the day before PDC09 starts, there is a &lt;a href="http://windowsteamblog.com/blogs/developers/archive/2009/10/07/free-windows-7-seminar-with-mark-russinovich-and-friends.aspx"&gt;FREE Windows 7 (seminar) Boot Camp&lt;/a&gt; led by top Microsoft Windows experts like Mark Russinovich, Landy Wang, and Arun Kishan. Then, during the PDC proper, we’ll have several deep-dive Windows 7 sessions.&lt;/p&gt;  &lt;p&gt;So here is the first set of Windows 7 sessions that we are announcing:&lt;/p&gt;  &lt;p&gt;This first one is probably my favorite topic (I am a geek, what can I say). What could be more important than performance, especially as it relates to Windows 7 and applications running on Windows 7? This has to be a MUST Attend session for any developer who writes any software (native or .NET) for &lt;b&gt;Windows&lt;/b&gt; (and not just Windows 7) – this is truly a unique opportunity.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Optimizing for Performance with the Windows Performance Toolkit&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;The Windows team uses the Windows Performance Toolkit (WPT) to optimize the Windows OS. Come and see how the Windows Performance team used the WPT throughout the Windows 7 development cycle to optimize for customer scenarios and how you can leverage many of its features and capabilities to help you build faster applications on Windows. This session will present case studies that demonstrate how you can use the toolkit to pinpoint areas for improvement in your application and provide you with some best practices to follow in order to create applications with optimum performance.&lt;/p&gt;  &lt;p&gt;The next two sessions are also personal favorites (you can’t blame me for loving Windows 7), as I think these technologies represent new levels of user interaction and adaptive user interfaces:&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Building Sensor- and Location-aware Applications with Windows 7 and .NET&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;How many times have you thought to yourself, “My application would be so much better if it knew where the user was?” With Windows 7 and.NET Framework 4.0, you now have the tools at your fingertips to location-enable your applications. Based on the new Location platform for Windows 7, the location API in .NET Framework 4.0 provides a single, consistent API to get you your latitude and longitude regardless of the underlying technology that acquired it—allowing you to focus on creating exciting, differentiated location-aware applications.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Windows Touch Deep Dive&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;Windows provides applications with a default experience for gestures and touch interaction. This provides applications that you want to go beyond that basic experience with a powerful platform to build upon. This session is targeted at developers interested in building touch-optimized experiences. We’ll look closely at some of the more powerful portions of the Touch platform, like manipulation and inertia processors, as well as cover real-world problems that developers have encountered and overcome. Come help build the next generation of user experiences!&lt;/p&gt;  &lt;p&gt;Another highly recommended session is the Windows Ribbon session. Before you dismiss the Ribbon, I suggest you take a second look and read between the lines of the Windows Ribbon native API. There is a lot of very interesting software architecture in the current API that provides a glimpse into tomorrow’s “commanding framework.”&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Windows Ribbon Technical Deep Dive&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;This talk will cover some of the more subtle and complex aspects of ribbon implementation, like designing a great gallery (a critical task for any ribbon), adding an outspace MRU, etc. We will draw from specific experiences with Windows Live and other partners and spread the learning that those teams amassed as Windows Ribbon guinea pigs.&lt;/p&gt;  &lt;p&gt;A lot has been said about the update to the Windows 7 graphics stack. This stack plays a major role in the performance improvements Windows 7 offers. You, as a developer, can tap into that user experience and start enjoying a rich and modern graphic framework that pushes GPUs to their limits.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Modern 3D Graphics Using Windows 7 &amp;amp; Direct3D 11 Hardware&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;Dig deep into the capabilities of Direct3D 11 and Windows 7to gain practical knowledge that will help you push graphics to the limit. Learn about the new tessellation stage in Direct3D 11, which enables an unprecedented level of rendering quality by dynamically generating geometry on the GPU. In addition, see how the multi-core improvements in the Direct3D 11 runtime can help you scale your application to take full advantage of all of the cores on a machine. Finally, take a peek at the power of DirectCompute (the hardware-accelerated general purpose computing technology) in a graphics application context.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Advanced Graphics Functionality Using DirectX&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;The number of PC configurations is exploding. With both netbooks and high-end desktop systems using the latest in graphics hardware, creating an application that can target all of these systems is getting harder every year. Join us as we explore the many options available in Windows 7 to facilitate graphics development across all kinds of hardware configurations, from low-end integrated GPUs to top of the line discrete GPUs. Learn about Direct3D 10 Level 9, which enables Direct3D 10 applications to run on pretty much every computer in the market today. Check out WARP, our new software rasterizer that lets your application use high-quality graphics even when there’s no graphics card. Finally, learn about Direct2D, DirectWrite, WIC, and the interoperability of Windows 7 technologies for making slick, high-quality graphics for your applications of the future.&lt;/p&gt;  &lt;p&gt;The last session for today’s post, but most certainly not the least, is about the &lt;a href="http://code.msdn.microsoft.com/WindowsAPICodePack"&gt;Windows API Code Pack for the Microsoft .NET framework&lt;/a&gt;. This is a framework that I have a personal interest in and I often blog about. With Visual Studio 2010 and .NET 4, .NET developers have an easier life. Nonetheless, there are still a great number of valuable Windows APIs that are NOT in the framework. This Open Source library provides a good intermediate solution.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Developing with the Windows API Code Pack for .NET Framework&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;The Windows API Code Pack for Microsoft .NET Framework provides a source code library that you can use to access some new Windows 7 features (and some existing features of older versions of the Windows operating system) from managed code. These Windows features are not available to developers today in the .NET Framework. This session will show you how to access features like taskbar integration, JumpLists, libraries, the sensor platform, Direct2D, and more.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://windowsteamblog.com/aggbug.aspx?PostID=526314" width="1" height="1"&gt;</description><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Windows+7/default.aspx">Windows 7</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Developers/default.aspx">Developers</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Microsoft/default.aspx">Microsoft</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Windows/default.aspx">Windows</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Multi-Touch/default.aspx">Multi-Touch</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Taskbar/default.aspx">Taskbar</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Sensor+and+Location/default.aspx">Sensor and Location</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Libraries/default.aspx">Libraries</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/.NET/default.aspx">.NET</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Windows+7+Application+Compatibility/default.aspx">Windows 7 Application Compatibility</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Windows+7+Training+Kit/default.aspx">Windows 7 Training Kit</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/PDC09/default.aspx">PDC09</category></item><item><title>Free Windows 7 Seminar with Mark Russinovich (and Friends)</title><link>http://windowsteamblog.com/blogs/developers/archive/2009/10/07/free-windows-7-seminar-with-mark-russinovich-and-friends.aspx</link><pubDate>Wed, 07 Oct 2009 19:17:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:526269</guid><dc:creator>Yochay Kiriaty</dc:creator><slash:comments>30</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://windowsteamblog.com/blogs/developers/rsscomments.aspx?PostID=526269</wfw:commentRss><comments>http://windowsteamblog.com/blogs/developers/archive/2009/10/07/free-windows-7-seminar-with-mark-russinovich-and-friends.aspx#comments</comments><description>&lt;p&gt;Have you ever wondered how Windows 7 resumes from sleep in less than 2 seconds? Or how Windows 7 can scale up to 256 cores? Or maybe you just want to want to learn about any Kernel improvements that will make your application run faster with no extra effort from you? &lt;/p&gt;
&lt;p align="left"&gt;&lt;a href="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/developers/PDC_5F00_Win_5F00_bootcamp_5F00_5E9DE442.jpg"&gt;&lt;img height="240" width="191" src="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/developers/PDC_5F00_Win_5F00_bootcamp_5F00_thumb_5F00_4BE8EA8B.jpg" alt="PDC_Win_bootcamp" border="0" title="PDC_Win_bootcamp" style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p align="left"&gt;Well, guess what? On Monday, November 16&lt;sup&gt;th&lt;/sup&gt;, the day before &lt;a href="http://microsoftpdc.com/"&gt;PDC 2009&lt;/a&gt; starts, we are running a &lt;b&gt;FREE&lt;/b&gt; Windows 7 Workshop&lt;b&gt; &lt;/b&gt;&amp;ndash;&lt;b&gt; &lt;/b&gt;AKA &lt;a href="http://microsoftpdc.com/Sessions/WKSP08"&gt;&lt;b&gt;Windows 7 Developer Boot Camp&lt;/b&gt;&lt;/a&gt;. That is&amp;nbsp; right, it's &lt;b&gt;FREE&lt;/b&gt; for anyone who wants to attend. Windows 7 is one of the most exciting pivotal releases of the year. As part of the wave of activity surrounding the product launch, we're opening up this workshop to &lt;b&gt;anyone&lt;/b&gt; who wants to attend - even if &lt;b&gt;you're not&lt;/b&gt; able to join the rest of the conference. So, if you live LA, its surroundings, or even the Bay Area, you can attend this workshop for FREE!&lt;/p&gt;
&lt;p&gt;Wait a minute! By now, you must be thinking to yourself, &amp;ldquo;If it is free, it can&amp;rsquo;t be that good.&amp;rdquo; Well it turns out that this Windows 7 Developers Boot Camp will include top Microsoft Windows experts like &lt;a href="http://www.microsoft.com/presspass/exec/techfellow/Russinovich/default.mspx"&gt;Mark Russinovich&lt;/a&gt;, &lt;a href="http://www.microsoft.com/presspass/exec/de/Wang/default.mspx"&gt;Landy Wang&lt;/a&gt;, and Arun Kishan. These are the guys who are behind a large number of the amazing performance improvements in Windows 7, and this is your onetime chance to meet them in person for an intense, deep, and high-quality session. Mark, Landy, and Arun will start by talking about Kernel and architectural improvements, for example, the &lt;a href="http://channel9.msdn.com/shows/Going+Deep/Arun-Kishan-Farewell-to-the-Windows-Kernel-Dispatcher-Lock/"&gt;Kernel Dispatcher Lock&lt;/a&gt;, new and even more efficient &lt;a href="http://channel9.msdn.com/shows/Going+Deep/Landy-Wang-Windows-Memory-Manager/"&gt;Windows Memory Management&lt;/a&gt;, and &lt;a href="http://channel9.msdn.com/posts/philpenn/Trigger-Started-Services/"&gt;Trigger Start Services&lt;/a&gt;, among many other topics. &lt;/p&gt;
&lt;p&gt;Next, they&amp;rsquo;ll take a dive deep into the different APIs, paying special attention to the new shell integration points in Windows 7 such as the taskbar, libraries, and search. Right after that, they&amp;rsquo;ll give some tips for getting the most out of today&amp;rsquo;s hardware using the Sensor &amp;amp; Location platform, multitouch, and the new graphics libraries (Direct2D, DirectX 11) that take advantage of the GPU. &lt;/p&gt;
&lt;p&gt;Regardless of whether you&amp;rsquo;re a C++, C#, or Visual Basic developer, if you're building a Windows application and you want your application to have the best possible performance, experience, and look-and-feel while running on Windows 7, this event is for you! I know I will be there; what about you?&lt;/p&gt;
&lt;p&gt;&lt;a href="http://microsoftpdc.com/Workshops"&gt;Register for the PDC Workshop&lt;/a&gt; or read more info about the &lt;a href="http://microsoftpdc.com/Sessions/WKSP08"&gt;Windows 7 Boot Camp&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://windowsteamblog.com/aggbug.aspx?PostID=526269" width="1" height="1"&gt;</description><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Windows+7/default.aspx">Windows 7</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Developers/default.aspx">Developers</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Microsoft/default.aspx">Microsoft</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Multi-Touch/default.aspx">Multi-Touch</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Taskbar/default.aspx">Taskbar</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Sensor+and+Location/default.aspx">Sensor and Location</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Libraries/default.aspx">Libraries</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/.NET/default.aspx">.NET</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Windows+7+Application+Compatibility/default.aspx">Windows 7 Application Compatibility</category></item><item><title>Windows 7 Taskbar Dynamic Overlay Icons and Progress Bars</title><link>http://windowsteamblog.com/blogs/developers/archive/2009/07/28/windows-7-taskbar-dynamic-overlay-icons-and-progress-bars.aspx</link><pubDate>Tue, 28 Jul 2009 17:31:22 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:520984</guid><dc:creator>Yochay Kiriaty</dc:creator><slash:comments>8</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://windowsteamblog.com/blogs/developers/rsscomments.aspx?PostID=520984</wfw:commentRss><comments>http://windowsteamblog.com/blogs/developers/archive/2009/07/28/windows-7-taskbar-dynamic-overlay-icons-and-progress-bars.aspx#comments</comments><description>&lt;p&gt;We covered the basics of the Windows 7 Taskbar in &lt;a href="http://windowsteamblog.com/blogs/developers/archive/2009/06/18/developing-for-the-windows-7-taskbar-application-id.aspx" target="_blank"&gt;Developing for the Windows 7 Taskbar – Application ID&lt;/a&gt;&lt;i&gt;&lt;/i&gt;, and how you can create a Jump List for your application in &lt;a href="http://windowsteamblog.com/blogs/developers/archive/2009/06/22/developing-for-the-windows-7-taskbar-jump-into-jump-lists-part-1.aspx" target="_blank"&gt;Developing for the Windows 7 Taskbar – Jump into Jump Lists – Part 1&lt;/a&gt;&lt;i&gt;&lt;/i&gt;, &lt;a href="http://windowsteamblog.com/blogs/developers/archive/2009/06/25/developing-for-the-windows-7-taskbar-jump-into-jump-lists-part-2.aspx" target="_blank"&gt;Part 2&lt;/a&gt;&lt;i&gt;&lt;/i&gt;, &lt;a href="http://windowsteamblog.com/blogs/developers/archive/2009/07/02/developing-for-the-windows-7-taskbar-jump-into-jump-lists-part-3.aspx" target="_blank"&gt;and Part 3&lt;/a&gt;&lt;i&gt;&lt;/i&gt;). In this post, we will explore how you can leverage the cool Taskbar functionality of dynamic overlay icons and multi-state progress bars.&lt;/p&gt;  &lt;p&gt;A central Windows 7 tenet is that the &amp;quot;User Is in Control&amp;quot;; that is, we empower users to take ownership of their desktop looks and functionality. From little things, like allowing users to arrange their Taskbar icons as they see fit, to enabling users to control the number of icons on the Taskbar. Windows 7 “removed” the System Tray Icon area. By default, almost all the tray icons are concealed. Consequently, it is safe to assume that large number of the notification balloons will also not be visible and most users will not see them. You can read more about the updates to the Notification Area &lt;a href="http://blogs.msdn.com/e7/archive/2008/09/29/follow-up-starting-launching-and-switching.aspx" target="_blank"&gt;here&lt;/a&gt;. To compensate for this lack of notification, Windows 7 Taskbar offers Overlay Icons and Progress Bars. By using overlay icons and progress bars, your application can provide contextual status information to the user in spite of the lack of a System Tray Icon area and even if the application’s window does not display. The user doesn’t even have to look at the thumbnail or the live preview of your app – the Taskbar button itself can reveal whether you have any interesting status updates. This functionality is part of our commitment to provide users with easily accessible information about an application's status without any extra clicking.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Overlay Icons&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;The &lt;a href="http://msdn.microsoft.com/en-us/library/dd562040(VS.85).aspx" target="_blank"&gt;ITaskbarList4&lt;/a&gt; interface, specifically its &lt;a href="http://msdn.microsoft.com/en-us/library/dd391696(VS.85).aspx" target="_blank"&gt;SetOverlayIcon&lt;/a&gt; function, exposes &lt;a href="file:///C:\Users\v-sagold\AppData\Local\Temp\WindowsLiveWriter-429641856\supfiles10470B99\image12.png"&gt;&lt;/a&gt;the native overlay functionality. The function takes a window handle, an icon handle, and optional description text, as you can see in the following code snippet.&lt;/p&gt;  &lt;div id="codeSnippetWrapper"&gt;   &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;HICON hIcon = NULL; &lt;span style="color: #008000"&gt;// for IDM_OVERLAY_CLEAR&lt;/span&gt;&lt;br /&gt;hIcon = LoadIcon(g_hInstance, MAKEINTRESOURCE(IDI_OVERLAY1));&lt;br /&gt;&lt;span style="color: #008000"&gt;// Set the window's overlay icon, possibly NULL value&lt;/span&gt;&lt;br /&gt;g_pTaskbarList-&amp;gt;SetOverlayIcon(hWnd, hIcon, NULL);&lt;br /&gt;&lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (hIcon) {&lt;br /&gt;&lt;span style="color: #008000"&gt;// need to clean up the icon as we no longer need it&lt;/span&gt;&lt;br /&gt;DestroyIcon(hIcon);&lt;br /&gt;}&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;Make sure you obtain ITaskbarList3 *g_pTaskbarList = NULL;as we did before, and CoCreate it:&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;CoCreateInstance(&lt;br /&gt;    CLSID_TaskbarList, &lt;br /&gt;    NULL, &lt;br /&gt;    CLSCTX_INPROC_SERVER, &lt;br /&gt;    IID_PPV_ARGS(&amp;amp;g_pTaskbarList));&lt;/pre&gt;
When running the above code in the proper context (you can download the application) the result looks like the following pictures. On the left, you see the application without any overlay icons, and on the right you can see the application with a red icon overlay.&lt;/div&gt;

&lt;p&gt;&lt;a href="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/developers/image_5F00_65EF7F14.png"&gt;&lt;img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="image" border="0" alt="image" src="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/developers/image_5F00_thumb_5F00_56D8A03A.png" width="546" height="186" /&gt;&lt;/a&gt; The managed wrapper for this feature resides in the Taskbar class that is part of the Windows API Code Pack for the .NET Framework. All that you need to do is use the &lt;b&gt;OverlayImage &lt;/b&gt;property (Taskbar.OverlayImage). Simply call: &lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;Taskbar.OverlayImage = &lt;br /&gt;        &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; OverlayImage(TaskbarDemo.Properties.Resources.Red, &lt;span style="color: #006080"&gt;&amp;quot;Red&amp;quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;Doing so allows you to provide an OverlayImage for the taskbar button. The TaskbarDemo project is a WinForms demo, and you can find the above code in the TaskbarDemoMainForm.cs. &lt;/p&gt;

&lt;p&gt;It’s equally easy to provide an extension method that does this to a WPF &lt;a href="http://msdn.microsoft.com/en-us/library/system.windows.window.aspx" target="_blank"&gt;Window&lt;/a&gt;. Note that the only thing that you need to do is get the right icon, which is easy using .NET resources. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Progress Bars&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you already use a standard progress bar in your application’s top level window, the DMW will pick it up and, by default, display its progress as an overlay on top of your application. However, you can programmatically control the progress bar behavior on your application’s icon. &lt;/p&gt;

&lt;p&gt;&lt;a href="file:///C:\Users\v-sagold\AppData\Local\Temp\WindowsLiveWriter-429641856\supfiles10470B99\image18.png"&gt;&lt;/a&gt;The native functionality is again found in the &lt;em&gt;ITaskbarList3 &lt;/em&gt;interface, this time in the &lt;a href="http://msdn.microsoft.com/en-us/library/dd391697(VS.85).aspx" target="_blank"&gt;SetProgressState&lt;/a&gt; and &lt;a href="http://msdn.microsoft.com/en-us/library/dd391698(VS.85).aspx" target="_blank"&gt;SetProgressValue&lt;/a&gt; functions. The functions are quite self-explanatory. You can set the progress bar’s state (SetProgressState) to, for example, indeterminate or error, and use SetProgressValue to set the progress value. The following code snippet illustrates how to use these functions:&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;span style="color: #0000ff"&gt;case&lt;/span&gt; WM_TIMER:&lt;br /&gt;    g_nProgress++;&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (g_nProgress == 1)&lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: #008000"&gt;// First time through, so we'll set our progress state&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;// to be indeterminate - this simulates a background &lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;// computation to figure out how much progress we'll need.&lt;/span&gt;&lt;br /&gt;        g_pTaskbarList-&amp;gt;SetProgressState(hWnd, TBPF_INDETERMINATE);&lt;br /&gt;    }&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;else&lt;/span&gt; &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (g_nProgress == MAX_PROGRESS_IND)&lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: #008000"&gt;// Now set the progress state to indicate we have some &lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;// normal progress to show.&lt;/span&gt;&lt;br /&gt;        g_pTaskbarList-&amp;gt;SetProgressValue(hWnd, 0, MAX_PROGRESS_NORMAL);&lt;br /&gt;        g_pTaskbarList-&amp;gt;SetProgressState(hWnd, TBPF_NORMAL);&lt;br /&gt;    }&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;else&lt;/span&gt; &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (g_nProgress &amp;gt; MAX_PROGRESS_IND)&lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (g_nProgress - MAX_PROGRESS_IND &amp;lt;= MAX_PROGRESS_NORMAL)&lt;br /&gt;        {&lt;br /&gt;            &lt;span style="color: #008000"&gt;// Now show normal progress to simulate a background &lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #008000"&gt;// operation&lt;/span&gt;&lt;br /&gt;            g_pTaskbarList-&amp;gt;SetProgressValue(&lt;br /&gt;                                hWnd, &lt;br /&gt;                                g_nProgress - MAX_PROGRESS_IND, &lt;br /&gt;                                MAX_PROGRESS_NORMAL);&lt;br /&gt;        }&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;else&lt;/span&gt;&lt;br /&gt;        {&lt;br /&gt;            &lt;span style="color: #008000"&gt;// Progress is done, stop the timer and reset progress &lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #008000"&gt;// state&lt;/span&gt;&lt;br /&gt;            KillTimer(hWnd, g_nTimerId);&lt;br /&gt;            g_nTimerId = 0;&lt;br /&gt;            g_pTaskbarList-&amp;gt;SetProgressState(hWnd, TBPF_NOPROGRESS);&lt;br /&gt;            MessageBox(hWnd, L&lt;span style="color: #006080"&gt;&amp;quot;Done!&amp;quot;&lt;/span&gt;, L&lt;span style="color: #006080"&gt;&amp;quot;Progress Complete&amp;quot;&lt;/span&gt;, MB_OK);&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;break&lt;/span&gt;;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;Note that on the first timer tick, we set the progress bar to TBPF_INDETERMINATE, and only after that did we set it to TBPF_NORMAL, which set the progress indicator to grow in size from left to right in proportion to the estimated amount of the operation completed.&lt;/p&gt;

&lt;p&gt;For managed code, we use the Windows Code Pack API. Much like the native progress bar, the managed code &lt;b&gt;Taskbar&lt;/b&gt; class includes a progress bar property (it is in its own a class), which allows you to set current value, max value, and statethe progress bar state. The progress bar states (found in the TaskbarButtonProgressState class) are:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;NoProgress –equal to the TBPF_NOPROGRESS native state &lt;/li&gt;

  &lt;li&gt;Indeterminate –equal to the TBPF_INDETERMINATE native state &lt;/li&gt;

  &lt;li&gt;Normal –equal to the TBPF_NORMAL native state &lt;/li&gt;

  &lt;li&gt;Error –equal to the TBPF_ERROR native state &lt;/li&gt;

  &lt;li&gt;Paused –equal to the TBPF_PAUSED native state &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can find a WinForms demo in the TaskbarDemo project and in the TaskbarDemoMainForm.cs, you can find the UpdateProgressBar function that is called by a timer to update the progress bar.&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;Taskbar.ProgressBar.State = &lt;br /&gt;    (TaskbarButtonProgressState)Enum.Parse(&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;typeof&lt;/span&gt;(TaskbarButtonProgressState), &lt;br /&gt;            (&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;)comboBoxProgressBarStates.SelectedItem);&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (Taskbar.ProgressBar.State != TaskbarButtonProgressState.Indeterminate)&lt;br /&gt;    Taskbar.ProgressBar.CurrentValue = progressBar1.Value;&lt;br /&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;As you can see, the code enables you to choose the state of the progress bar. Changing it to the error state turns the color of the progress bar on the Taskbar Icon to red.&lt;/p&gt;

&lt;p&gt;The icing on the Taskbar progress bar &amp;quot;cake&amp;quot; is that you get this functionality FOR FREE if you use the standard progress dialog for file operations. (As we advance in this series, you’ll see that you get lots of functionality for free if you follow the standard guidelines of Windows programming.) For example, if you invoke a file operation using the &lt;a href="http://msdn.microsoft.com/en-us/library/bb762164(VS.85).aspx"&gt;SHFileOperation&lt;/a&gt; API or &lt;a href="http://msdn.microsoft.com/en-us/library/bb775771(VS.85).aspx"&gt;IFileOperation&lt;/a&gt; interface, the Taskbar button progress bar automatically displays the progress information (including errors) of that operation. This is what Windows Explorer does with great success. &lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/sasha/archive/2009/02/16/windows-7-taskbar-overlay-icons-and-progress-bars.aspx"&gt;Original&lt;/a&gt; post from &lt;a href="http://blogs.microsoft.co.il/blogs/sasha/archive/2009/02/16/windows-7-taskbar-overlay-icons-and-progress-bars.aspx"&gt;Sasha Goldstein&lt;/a&gt;&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;br /&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://windowsteamblog.com/aggbug.aspx?PostID=520984" width="1" height="1"&gt;</description><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Windows+7/default.aspx">Windows 7</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Developers/default.aspx">Developers</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Taskbar/default.aspx">Taskbar</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/.NET/default.aspx">.NET</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Source+Code/default.aspx">Source Code</category></item><item><title>Is Your Application Ready for Windows 7 RTM?</title><link>http://windowsteamblog.com/blogs/developers/archive/2009/07/23/is-your-application-ready-for-windows-7-rtm.aspx</link><pubDate>Thu, 23 Jul 2009 08:29:02 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:520121</guid><dc:creator>Yochay Kiriaty</dc:creator><slash:comments>48</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://windowsteamblog.com/blogs/developers/rsscomments.aspx?PostID=520121</wfw:commentRss><comments>http://windowsteamblog.com/blogs/developers/archive/2009/07/23/is-your-application-ready-for-windows-7-rtm.aspx#comments</comments><description>&lt;p&gt;Yesterday Windows 7 completed a major milestone--&lt;a href="http://windowsteamblog.com/blogs/windows7/archive/2009/07/22/windows-7-has-been-released-to-manufacturing.aspx" target="_blank"&gt;release to manufacturing&lt;/a&gt; (RTM)! And in three months time – on October 22&lt;sup&gt;nd&lt;/sup&gt; – Windows 7 will be available for everyone to enjoy. Excitement about the upcoming public release of Windows 7 has been growing for months and expectations are for a much quicker adoption rate than what we saw with the previous Windows version. &lt;/p&gt;  &lt;p&gt;As we approach October 22&lt;sup&gt;nd&lt;/sup&gt; you need to ask yourself: Is your application ready for Windows 7? What will happen when end users install your application on Windows 7? Will your application run? Will your application behave like a Windows 7 first class citizen? Will users see any difference when running applications on Windows 7 versus Windows Vista or XP? October 22&lt;sup&gt;nd&lt;/sup&gt; is just around the corner and we are here to help you answer, “&lt;b&gt;YES!&lt;/b&gt;” to these questions and&lt;b&gt; &lt;/b&gt;be able to&lt;b&gt; &lt;/b&gt;state with confidence that, &lt;b&gt;“Absolutely, my application &lt;i&gt;rocks&lt;/i&gt; on Windows 7&lt;/b&gt;.” We want to help your users get the best possible Windows 7 experience from your application starting on Day 1.&lt;/p&gt;  &lt;p&gt;All this sounds great, but what steps do you need to take in order to be able to say: “Yes my application is a first-class Windows citizen”? Is there a check list? You bet!&lt;/p&gt;  &lt;p&gt;You need to do three things to ensure a smooth transition:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Make sure your application is Windows 7 compatible &lt;/li&gt;    &lt;li&gt;Optimize your application experience and performance for Windows 7 &lt;/li&gt;    &lt;li&gt;Provide new and exciting user experiences with Windows 7&amp;#160; &lt;/li&gt; &lt;/ol&gt;  &lt;ol&gt;&lt;/ol&gt;  &lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Make sure your application is Windows 7 compatible&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Before considering using any new Windows 7 features, make sure your application is compatible with Windows 7. There is no escape from this; it is essential that you make sure that your application runs well on Windows 7. There is nothing worse for an end user than to be excited about the new Windows 7 operating system just to discover that a favorite application doesn’t perform properly. A bad user experience hurts everyone--which is why you have to make sure your application installs and runs on all Windows 7 versions (including E - &lt;i&gt;&lt;a href="http://windowsteamblog.com/blogs/developers/archive/2009/07/13/windows-7-e-best-practices-for-isvs.aspx"&gt;Windows 7 E Best Practices for ISVs&lt;/a&gt;&lt;/i&gt;) and supports both 32- and 64-bit versions. &lt;/p&gt;  &lt;p&gt;If your application is compatible with Windows Vista you are in a good shape! We expect most applications that run on Windows Vista to run on Windows 7. Obviously, you can’t take this for granted and must check (and double check) that your application truly is compatible with Windows 7. There are a few differences between Windows Vista and Windows 7 that can affect specific application functions, so if you haven’t checked the &lt;a href="http://code.msdn.microsoft.com/Windows7AppQuality"&gt;&lt;i&gt;Windows 7 Quality Cookbook&lt;/i&gt;&lt;/a&gt; lately, we highly recommend that you do so. &lt;/p&gt;  &lt;p&gt;If your application was designed for Windows XP (or earlier Windows versions), and you haven't confirmed its compatibility with Windows Vista, there are a few areas (for example, UAC), that you should especially note. It is important to keep in mind that there is no one silver bullet for application compatibility issues. Each application comes with its own set of issues that are dependent on specific implementation details. The &lt;a href="http://msdn.microsoft.com/library/bb757005"&gt;&lt;i&gt;Windows Vista Application Compatibility Cookbook&lt;/i&gt;&lt;/a&gt; is still very relevant for Windows 7, as 99% of its topics apply to Windows 7. With that said, a few topics rise above the others. The following seven areas represent about a large number of the reported application compatibility problems.&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;b&gt;Version Checking&lt;/b&gt; – by far the top application compatibility problem. Ever get a message from an application saying, “Requires Windows XP or higher” when you are running on Windows 7? If so, you hit a version checking issue. You can read more about this topic - &lt;a href="http://msdn.microsoft.com/en-us/library/bb756927.aspx" target="_blank"&gt;Application Compatibility: Operating System Versioning&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;b&gt;Data Redirection&lt;/b&gt; – beginning with Windows Vista, standard users have restricted access to certain files, folders, and registry keys. When an application is trying to write to these locations, it gets redirected to somewhere else. Most of the time this is transparent to both users and application developers, but sometimes it is not and that lead to some very interesting results. You can read about this topic - &lt;a href="http://support.microsoft.com/kb/927387" target="_blank"&gt;Common file and registry virtualization issues in Windows Vista&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;b&gt;IE Protected Mode &lt;/b&gt;– starting with Windows Vista, by default IE runs with lower privileges. This usually means that some ActiveX controls that work on Windows XP don’t work on Windows Vista and Windows 7. Need more information, you can read &lt;a href="http://blogs.msdn.com/ie/archive/2006/02/09/528963.aspx" target="_blank"&gt;Protected Mode in Vista IE7&lt;/a&gt; (and yes this is still applicable for IE8.) &lt;/li&gt;    &lt;li&gt;&lt;b&gt;Session 0 Isolation&lt;/b&gt; - in Windows Vista, services run in their own session (session 0) and not in the user session(s) (session 1 and above). This security boundary protects the system from many vicious attack vectors and is absolutely necessary. However, it also introduces communication problems between services and application like blocking your messages! You can read more about this topic -&amp;#160; &lt;a href="http://blogs.msdn.com/cjacks/archive/2006/10/24/modifying-the-mandatory-integrity-level-for-a-securable-object-in-windows-vista.aspx" target="_blank"&gt;Modifying the Mandatory Integrity Level for a Securable Object in Windows Vista&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;b&gt;Installer Detection&lt;/b&gt; – starting with Windows Vista, the OS automatically tries to detect if a given application is an installer application, which usually means that the application requires elevation to administrator privileges. However, sometimes these heuristics can cause problems. Interested in additional information, read about &lt;a href="http://msdn.microsoft.com/en-us/library/aa905330.aspx" target="_blank"&gt;The Windows Vista and Windows Server® 2008 Developer Story&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;b&gt;User Interface Privilege Isolation&lt;/b&gt; – this prevents an application (process) from sending messages to another process with higher privileges even if running under the same user's account. While this protects from shatter attacks, it can also break some applications. &lt;/li&gt;    &lt;li&gt;&lt;b&gt;High DPI&lt;/b&gt; –during install, Windows 7 automatically detects whether your screen supports High DPI. If it does, Windows 7 automatically sets the screen resolution to High DPI. If your application is not High DPI aware, this may cause some display issues (like text clipping). Read more about &lt;a href="http://msdn.microsoft.com/en-us/library/dd756693(VS.85).aspx" target="_blank"&gt;Ensuring your application displays properly on High-DPI Displays&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;In the following weeks, we will address in detail each of the above topics to help you get ready for Windows 7.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Optimize your application experience and performance for Windows 7&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;After verifying that your application can install and run on Windows 7 without any problems, it is time to step up and optimize your application’s user experiences and performance while running on Windows 7. Do this by taking advantage of the great new features offered with Windows 7. These include new user interface innovations like the Taskbar and Libraries, to more fundamental features like Trigger Start Services or the new Troubleshooting platform. By optimizing your application for Windows 7, you can make sure that your end user's experiences when running your application on Windows 7 surpasses their expectations. Users will expect applications to work properly with the Taskbar (just one example); but if your application is not optimized for the new Windows 7 Taskbar experience, end users might just notice that. &lt;/p&gt;  &lt;p&gt;When you're ready to optimize your application for Windows 7, you might consider using one or more of the following features:&lt;/p&gt;  &lt;table border="0" cellspacing="0" cellpadding="20" width="580"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="370"&gt;         &lt;ul&gt;           &lt;li&gt;&lt;b&gt;Taskbar &lt;/b&gt;– The new Taskbar in Windows 7 provides more information to the user in more intuitive ways, with features like Jump Lists that helps users quickly “jump” into where they want to go. You can read more &lt;a href="http://windowsteamblog.com/blogs/developers/archive/2009/06/18/developing-for-the-windows-7-taskbar-application-id.aspx"&gt;Developing for the Windows 7 Taskbar – Application ID&lt;/a&gt;. &lt;/li&gt;            &lt;li&gt;&lt;b&gt;Libraries &lt;/b&gt;–&lt;b&gt; &lt;/b&gt;Libraries are the primary entry points to user data in Windows 7. A Windows 7 Library is a user-defined collection of content that represents the user’s data independently from the folder hierarchy. Users can unify and flatten the folder hierarchy by aggregating any number of physical locations (on their local machine or on remote machines) into a single view – which is the library. You can read more - &lt;a href="http://windowsteamblog.com/blogs/developers/archive/2009/06/11/windows-7-programming-guide-libraries.aspx"&gt;Windows 7 Programming Guide – Libraries&lt;/a&gt;. &lt;/li&gt;         &lt;/ul&gt;       &lt;/td&gt;        &lt;td valign="top" width="210"&gt;         &lt;br /&gt;&lt;a href="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/developers/image_5F00_0C2CB989.png"&gt;&lt;img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="image" border="0" alt="image" src="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/developers/image_5F00_thumb_5F00_7D15DAAE.png" width="205" height="319" /&gt;&lt;/a&gt;&amp;#160;&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;ul&gt;   &lt;li&gt;&lt;b&gt;Trigger Start Services&lt;/b&gt; – The Windows 7 Service Control Manager has been extended so that a service can be automatically started and stopped when a specific system event, or trigger, occurs on the system. Trigger-start capabilities remove the need for services to start up automatically at computer startup and then poll or wait for an event to occur, such as a device arrival. More about this topic – &lt;a href="http://msdn.microsoft.com/en-us/library/dd405513(VS.85).aspx" target="_blank"&gt;Service Trigger Events&lt;/a&gt;. &lt;/li&gt;    &lt;li&gt;&lt;b&gt;Power Optimization&lt;/b&gt; – Windows 7 provides the infrastructure and tools that make it easy for developers to determine the energy impact of their applications. A set of event callbacks enable applications to reduce their activity when the system is on battery power and automatically scale up when the system is on AC power.&lt;b&gt;&lt;/b&gt; &lt;/li&gt;    &lt;li&gt;&lt;b&gt;Troubleshooting Platform &lt;/b&gt;– Windows 7 delivers a comprehensive and extensible Troubleshooting Platform that uses a PowerShell-based mechanism to troubleshoot and resolve problems. The Troubleshooting Platform seamlessly integrates with the Windows 7 PC Solution Center, enabling other applications to execute diagnostics in a similar manner as part of their PC management regimen. Read more about &lt;a href="http://msdn.microsoft.com/en-us/library/dd323778(VS.85).aspx" target="_blank"&gt;Windows Troubleshooting Platform&lt;/a&gt;. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;a href="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/developers/image_5F00_3C075B4A.png"&gt;&lt;img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="image" border="0" alt="image" src="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/developers/image_5F00_thumb_5F00_1B13E8A3.png" width="350" height="268" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;b&gt;Windows Error Reporting &lt;/b&gt;- Windows Error Reporting (WER) is a set of Windows technologies that capture software crash data and support end-user reporting of crash information. Through Winqual services, software and hardware vendors can access reports in order to analyze and respond to these problems. This set of tools provides amazing real-time information about the quality of your software and can help facilitate software updates and patches. &lt;a href="http://www.microsoft.com/whdc/maintain/StartWER.mspx" target="_blank"&gt;Get Started with Windows Error Reporting&lt;/a&gt;. &lt;/li&gt;    &lt;li&gt;&lt;b&gt;I/O Optimization&lt;/b&gt; – I/O prioritization improves the responsiveness of the system without significantly decreasing the throughput of the system. If you have any I/O-bound long services that you can run in the background, the user will be thankful. Non-I/O optimized applications tend to hug the I/O and put an extra burden on the system. If your application optimizes the I/O for non critical application services, it can dramatically improve the overall system behavior. &lt;b&gt;&lt;/b&gt;&lt;/li&gt;    &lt;li&gt;&lt;b&gt;Restart Manager&lt;/b&gt; – This technology allows automatic post-crash restarts as well as application and operating system updates without rebooting the entire machine. When you implement this functionality, you get a second chance to save critical information if your application crashes. Windows will automatically restart your application and try to reload the information the user just used. This same technology facilitates updating most applications and the operating system without the need to reboot. If a reboot is needed, then Windows will make sure your application restarts and returns to its latest state &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;strong&gt;Provide new and exciting user experiences with Windows 7&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Once your application has passed the first two steps, you can really differentiate your it by creating new and exciting user experiences. Windows 7 enables developers to create distinctive and intuitive applications that significantly enhance discoverability, usability, and sheer enjoyment. New methods of desktop integration put application functionality right at the user’s fingertips. New Touch APIs enable natural interactions through multitouch and finger-panning gestures. Rapid advances in hardware and software technology are also driving higher-fidelity user experiences. Windows 7 brings these advances under developer control with new and flexible APIs that take full advantage of the technology, while making it even easier to develop compelling applications.&lt;/p&gt;  &lt;p&gt;Windows 7 includes many new features that can make your application shine, raising it above the competition. When you think about creating new and exciting user experiences, consider using one or more of the following features:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;b&gt;Ribbon&lt;/b&gt; – Windows 7 features the Ribbon interface from Office 2007 throughout the operating system, enabling improved user interface development on the platform. This means that developers can eliminate much of the drudgery of Win32 UI development and deliver a rich, graphical, animated, and highly familiar user interface by using the markup-based UI and a small, high-performance, native code runtime. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;a href="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/developers/image_5F00_20EE8C3C.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/developers/image_5F00_thumb_5F00_3911F697.png" width="565" height="68" /&gt;&lt;/a&gt;&amp;#160;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;b&gt;Multitouch&lt;/b&gt;&amp;#160;&lt;b&gt;&amp;amp; Ink&lt;/b&gt; – Windows 7 features improved touch and gesture support, empowering developers to quickly and easily create unique application experiences that go beyond simple mouse pointing, clicking, and dragging. The new multi-touch APIs support rich gestures, such as pan, zoom, and rotate. All gestures provide direct visual feedback, and interact with underlying content in a natural and intuitive manner. &lt;/li&gt;    &lt;li&gt;&lt;b&gt;Sensor and Location Platform&lt;/b&gt; - Windows 7 has changed how developers use sensors. It includes native support for sensors, expanded by a new development platform for working with sensors, including location sensors (such as GPS devices) and sensors (such as an ambient light sensor or a temperature gauge), to create environmental awareness in Windows applications. Location sensors can unlock new opportunities for location-based services. &lt;/li&gt;    &lt;li&gt;&lt;b&gt;New Graphics Stack&lt;/b&gt; – Windows 7 puts new graphics capability into the hands of application developers through a new set of DirectX APIs. Win32 developers can take advantage of the latest innovations in GPUs to add fast, scalable, high-quality, 2D and 3D graphics, text, and images to their applications. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;a href="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/developers/image_5F00_460BD6A8.png"&gt;&lt;img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="image" border="0" alt="image" src="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/developers/image_5F00_thumb_5F00_453370BE.png" width="240" height="198" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;b&gt;Media Platform&lt;/b&gt; – Media Foundation and DirectShow® provide the basis for media support in Windows. Media Foundation was introduced in Windows Vista as the replacement for DirectShow. In Windows 7, Media Foundation has been enhanced to provide better format support, including:       &lt;ul&gt;       &lt;li&gt;MPEG-4, &lt;/li&gt;        &lt;li&gt;Support for video capture devices and hardware codecs, including H.264 video, MJPEG, and MP3 &lt;/li&gt;        &lt;li&gt;New sources for MP4, 3GP, MPEG2-TS, and AVI &lt;/li&gt;        &lt;li&gt;New file sinks for MP4, 3GP, and MP3 &lt;/li&gt;     &lt;/ul&gt;   &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;And for developers Windows 7 adds new high-level APIs that make it much simpler to write media applications. &lt;/p&gt;  &lt;li&gt;&lt;b&gt;Federated Search&lt;/b&gt; – Windows 7 supports searching for documents beyond the user’s own PC. Developers and IT professionals can enable their search engines, document repositories, Web applications, and proprietary data stores to be searched from Windows 7 without needing to write and deploy client code. This enables end users to search their corporate intranet or the Web as easily as they can search their local files—all from within the same familiar Windows interface. &lt;/li&gt;  &lt;li&gt;&lt;b&gt;Device Stage Integration&lt;/b&gt; – Windows 7 combines software and services to create exciting new experiences for mobile phones, portable media players, cameras, and printers. Windows 7 makes it easier to use these devices directly from the Windows desktop. It also provides device makers with prominent placement on the Windows desktop, with branding opportunities and a simple interface for presenting the functionality and services that the device supports.     &lt;p&gt;&lt;/p&gt;    &lt;p&gt;I hope this post give you enough to start work with, making sure your application rocks on Windows 7!&lt;/p&gt;    &lt;p&gt;&lt;/p&gt;    &lt;p&gt;&lt;/p&gt;    &lt;p&gt;&lt;/p&gt;    &lt;p&gt;&lt;/p&gt;    &lt;p&gt;&lt;/p&gt; &lt;/li&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://windowsteamblog.com/aggbug.aspx?PostID=520121" width="1" height="1"&gt;</description><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Developers/default.aspx">Developers</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Microsoft/default.aspx">Microsoft</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Multi-Touch/default.aspx">Multi-Touch</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Taskbar/default.aspx">Taskbar</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Sensor+and+Location/default.aspx">Sensor and Location</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Libraries/default.aspx">Libraries</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/.NET/default.aspx">.NET</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Windows+7+Application+Compatibility/default.aspx">Windows 7 Application Compatibility</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/ETW/default.aspx">ETW</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Source+Code/default.aspx">Source Code</category></item><item><title>7 Ways to Get Free Tickets to PDC 2009 Plus up to $17,777</title><link>http://windowsteamblog.com/blogs/developers/archive/2009/07/14/7-ways-to-get-free-tickets-to-pdc-2009-plus-up-to-17-777.aspx</link><pubDate>Tue, 14 Jul 2009 20:16:50 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:518731</guid><dc:creator>Yochay Kiriaty</dc:creator><slash:comments>33</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://windowsteamblog.com/blogs/developers/rsscomments.aspx?PostID=518731</wfw:commentRss><comments>http://windowsteamblog.com/blogs/developers/archive/2009/07/14/7-ways-to-get-free-tickets-to-pdc-2009-plus-up-to-17-777.aspx#comments</comments><description>&lt;p&gt;Do you want to win a free trip to Los Angeles and a free ticket to PDC 2009? Do you think you have what it takes to win $17,777? Do you think you can write an amazing Windows 7 application?&lt;/p&gt;  &lt;p&gt;Well, if your answer to any of the above question is &amp;quot;Yes!&amp;quot; then say hello to the &lt;a href="https://www.code7contest.com/"&gt;Code&lt;sup&gt;7&lt;/sup&gt; Contest&lt;/a&gt;. The Code&lt;sup&gt;7&lt;/sup&gt; contest is where your application design ingenuity gives you the opportunity to get millions of eyes on your work, plus a trip to LA for PDC09, and up to &lt;b&gt;$17,777 in cash!&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/developers/clip_5F00_image002_5F00_6FD1F86B.jpg"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image002" border="0" alt="clip_image002" src="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/developers/clip_5F00_image002_5F00_thumb_5F00_0F80D234.jpg" width="538" height="307" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Code&lt;sup&gt;7&lt;/sup&gt; is a special coding contest for developers. It is a great opportunity to show the world your creativity and coding powers. It is a way for you to cash in on your knowledge and skills. &lt;/p&gt;  &lt;p&gt;This is not just another standard code contest; this contest gives the finalists the opportunity to present their application at PDC 2009 in LA. The first prize is a real gem: $17,777 in cash, the opportunity to present the application to Microsoft executives at PDC 2009, plus worldwide interest in your application including a massive “marketing bump” for your application.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;u&gt;To enter, you must: &lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;Build an original, consumer-oriented client application prototype that runs natively on Windows 7 (for example Win32, WPF, MFC or WinForms – not an Air application or just a gadget) and addresses one or more of the following topic categories: &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Simplify My Life &lt;/li&gt;    &lt;li&gt;More Media, More Places &lt;/li&gt;    &lt;li&gt;Gaming &lt;/li&gt;    &lt;li&gt;Work From Anywhere &lt;/li&gt;    &lt;li&gt;Safeguard Your Work &lt;/li&gt;    &lt;li&gt;Applications for a Better Tomorrow &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;The application &lt;b&gt;must&lt;/b&gt; use at least one of the following Windows 7 technology features; however, judging will give more weight to entries that take advantage of more than one of these features: &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Libraries &lt;/li&gt;    &lt;li&gt;Windows Touch &lt;/li&gt;    &lt;li&gt;Shell Integration &lt;/li&gt;    &lt;li&gt;DX11 (DirectX 11) &lt;/li&gt;    &lt;li&gt;Sensor and Location Platform &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;So if you have being following my blog you have some advantage. &lt;/p&gt;  &lt;p&gt;The contest has several stages and few rules you need to be aware of:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;To enter this contest you must create and submit a &lt;b&gt;video&lt;/b&gt; in which you describe and demonstrate your application. &lt;/li&gt;    &lt;li&gt;The &lt;strong&gt;first qualifying&lt;/strong&gt; round starts at 12:00 a.m. Pacific Time (PT) on &lt;strong&gt;July 13, 2009&lt;/strong&gt;, and ends at 11:59 p.m. PT on &lt;strong&gt;October 10, 2009&lt;/strong&gt; (“Entry Period”). You will be able to able to submit your video until &lt;strong&gt;midnight October 10, 2009&lt;/strong&gt;. Your entry will be included in a pool with all eligible entries based on your geographical region. &lt;/li&gt;    &lt;li&gt;Entries received by 11:59 p.m. PT on &lt;strong&gt;August 15, 2009&lt;/strong&gt;, will be eligible to win an “Early Bird” prize described in the Winner Determination section below. &lt;/li&gt;    &lt;li&gt;Following the close of the first qualifications, a panel of judges will select two runner-up winners and one Finalist from each Region. &lt;/li&gt;    &lt;li&gt;Following judging, Microsoft will notify all winners and finalists and provide instructions for submitting their applications for evaluation. &lt;/li&gt;    &lt;li&gt;Finalists will be invited to present their applications to a panel of judges at the Microsoft Partner Developer Conference 2009 (PDC09) in Los Angeles, CA, USA. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;For the complete contest rules and legal notice, please refer to the “RULES” section on the Code7 Contest Web site - &lt;a href="https://www.code7contest.com/"&gt;https://www.code7contest.com/&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;So, what are you waiting for? Get going and start working on your Windows 7 application!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://windowsteamblog.com/aggbug.aspx?PostID=518731" width="1" height="1"&gt;</description><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Windows+7/default.aspx">Windows 7</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Developers/default.aspx">Developers</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Microsoft/default.aspx">Microsoft</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Multi-Touch/default.aspx">Multi-Touch</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Taskbar/default.aspx">Taskbar</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Sensor+and+Location/default.aspx">Sensor and Location</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Libraries/default.aspx">Libraries</category></item><item><title>Developing for the Windows 7 Taskbar – Jump into Jump Lists – Part 3</title><link>http://windowsteamblog.com/blogs/developers/archive/2009/07/02/developing-for-the-windows-7-taskbar-jump-into-jump-lists-part-3.aspx</link><pubDate>Thu, 02 Jul 2009 20:59:29 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:518119</guid><dc:creator>Yochay Kiriaty</dc:creator><slash:comments>4</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://windowsteamblog.com/blogs/developers/rsscomments.aspx?PostID=518119</wfw:commentRss><comments>http://windowsteamblog.com/blogs/developers/archive/2009/07/02/developing-for-the-windows-7-taskbar-jump-into-jump-lists-part-3.aspx#comments</comments><description>&lt;p&gt;So far, you have seen how you can opt into the Windows 7 Taskbar Jump List experience by creating a Jump List for your application (in the &lt;a href="http://windowsteamblog.com/blogs/developers/archive/2009/06/25/developing-for-the-windows-7-taskbar-jump-into-jump-lists-part-2.aspx"&gt;Developing for the Windows 7 Taskbar – Jump into Jump Lists – Part 2&lt;/a&gt; post.) You have also seen the Windows 7 default support for listing “Recent” or “Frequent” destinations as well as how to create your own custom categories. In this post, we will explore more of the Jump List features and discover how easy it is to add Tasks to your application's Jump List. &lt;/p&gt;  &lt;p&gt;User tasks are customized tasks that get their own Tasks category. As a developer, you can set the title of the displayed task, the icon on the left and, more important, and the “application” that is launched once you activate this task. You can view user’s tasks as shortcuts to the functionality our applications can provide. As you might remember, user tasks are the verbs in our vocabulary; for example, Windows Media Player provides a “Resume last playlist” task and Sticky Notes provides a “New note” task.&lt;/p&gt;  &lt;p&gt;A user task is usually an &lt;a href="http://msdn.microsoft.com/en-us/library/bb774950(VS.85).aspx"&gt;IShellLink&lt;/a&gt; object that launches any given application (your application or any other one you choose) with specific command line parameters. While you cannot categorize tasks, you can separate them using a special separator object. Here’s an example of a Jump List that uses a separator to split three tasks into a group of two plus an additional task:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/developers/image_5F00_17EEBBC0.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/developers/image_5F00_thumb_5F00_574C6F50.png" width="238" height="230" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;So what does it take to add tasks to a Jump List? Well, not that much. Basically it is a single call to the &lt;b&gt;AddUserTasks&lt;/b&gt; function in an interface that we are already familiar with, the ICustomDestinationList (ICustomDestinationList::AddUserTasks(IObjectArray) Method). Looking at the code, you will see a single line of code, &lt;b&gt;hr = pcdl-&amp;gt;AddUserTasks(poa);.&lt;/b&gt;&lt;b&gt; &lt;/b&gt;However, as always, someone needs to create and build that poa, IObjectArray, and parameter and fill it with relevant information. Let’s review that process now.&lt;/p&gt;  &lt;p&gt;We are going to create a collection of IShellLinks. This collection will be later cast to the required IObjectArray parameter. The following code is the beginning of that process.&lt;/p&gt;  &lt;div id="codeSnippetWrapper"&gt;   &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;IObjectCollection *poc;&lt;br /&gt;HRESULT hr = CoCreateInstance(&lt;br /&gt;D_EnumerableObjectCollection, NULL, CLSCTX_INPROC, IID_PPV_ARGS(&amp;amp;poc));&lt;br /&gt;&lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (SUCCEEDED(hr))&lt;br /&gt;{&lt;br /&gt;    IShellLink * psl;&lt;br /&gt;    hr = _CreateShellLink(L&lt;span style="color: #006080"&gt;&amp;quot;/Task1&amp;quot;&lt;/span&gt;, L&lt;span style="color: #006080"&gt;&amp;quot;Task 1&amp;quot;&lt;/span&gt;, &amp;amp;psl);&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (SUCCEEDED(hr))&lt;br /&gt;    {&lt;br /&gt;        hr = poc-&amp;gt;AddObject(psl);&lt;br /&gt;        psl-&amp;gt;Release();&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;Here you can see that we used COM (again) and CoCreate and IObjectCollection, &lt;b&gt;poc&lt;/b&gt;. Next, we call to a helper function called CreateShellLink that receives three parameters: &lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;The first parameter is the command line argument to the task &lt;/li&gt;

  &lt;li&gt;The second parameter is the title that will be displayed &lt;/li&gt;

  &lt;li&gt;The last parameter is a pointer to IShellLink &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The object is then filed according to the relevant information. &lt;/p&gt;

&lt;p&gt;Last, we add the recently created IShellLink to the object collection. You may ask yourself where the parameter that provides the path to the executable that we plan to launch is. Well that is a good question. For simplicity, we have hard-coded that information as shown in the following code snippet:&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (SUCCEEDED(hr))&lt;br /&gt;{&lt;br /&gt;    hr = _CreateShellLink2(&lt;br /&gt;            L&lt;span style="color: #006080"&gt;&amp;quot;C:\\Users\\&amp;lt;my user&amp;gt;\\Documents\\new text file.txt&amp;quot;&lt;/span&gt;, &lt;br /&gt;            L&lt;span style="color: #006080"&gt;&amp;quot;NotePad&amp;quot;&lt;/span&gt;, &lt;br /&gt;            &amp;amp;psl);&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (SUCCEEDED(hr))&lt;br /&gt;    {&lt;br /&gt;        hr = poc-&amp;gt;AddObject(psl);&lt;br /&gt;        psl-&amp;gt;Release();&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;Here you can see we call to a hard-coded _&lt;b&gt;CreateShellLink2&lt;/b&gt; function. This receives a path to a text file as one of its parameters and, as you can see, we are launching Notepad. &lt;/p&gt;

&lt;p&gt;Here is the code for the &lt;b&gt;CreateShellLink2&lt;/b&gt; function:&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;HRESULT _CreateShellLink2(&lt;br /&gt;            PCWSTR pszArguments, PCWSTR pszTitle, &lt;br /&gt;            IShellLink **ppsl)&lt;br /&gt;{&lt;br /&gt;    IShellLink *psl;&lt;br /&gt;    HRESULT hr = CoCreateInstance(&lt;br /&gt;                    CLSID_ShellLink, &lt;br /&gt;                    NULL, &lt;br /&gt;                    CLSCTX_INPROC_SERVER, &lt;br /&gt;                    IID_PPV_ARGS(&amp;amp;psl));&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (SUCCEEDED(hr))&lt;br /&gt;    {&lt;br /&gt;        hr = psl-&amp;gt;SetPath(c_szNotePadExecPath);&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (SUCCEEDED(hr))&lt;br /&gt;            {&lt;br /&gt;                hr = psl-&amp;gt;SetArguments(pszArguments);&lt;br /&gt;                &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (SUCCEEDED(hr))&lt;br /&gt;                {&lt;br /&gt;                    &lt;span style="color: #008000"&gt;// The title property is required on Jump List items &lt;/span&gt;&lt;br /&gt;                    &lt;span style="color: #008000"&gt;// provided as an IShellLink instance. This value is used &lt;/span&gt;&lt;br /&gt;                    &lt;span style="color: #008000"&gt;// as the display name in the Jump List.&lt;/span&gt;&lt;br /&gt;                    IPropertyStore *pps;&lt;br /&gt;                    hr = psl-&amp;gt;QueryInterface(IID_PPV_ARGS(&amp;amp;pps));&lt;br /&gt;                    &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (SUCCEEDED(hr))&lt;br /&gt;                    {&lt;br /&gt;                        PROPVARIANT propvar;&lt;br /&gt;                        hr = InitPropVariantFromString(pszTitle, &amp;amp;propvar);&lt;br /&gt;                        &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (SUCCEEDED(hr))&lt;br /&gt;                        {&lt;br /&gt;                            hr = pps-&amp;gt;SetValue(PKEY_Title, propvar);&lt;br /&gt;                            &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (SUCCEEDED(hr))&lt;br /&gt;                            {&lt;br /&gt;                                hr = pps-&amp;gt;Commit();&lt;br /&gt;                                &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (SUCCEEDED(hr))&lt;br /&gt;                                {&lt;br /&gt;                                    hr = psl-&amp;gt;QueryInterface&lt;br /&gt;                                            (IID_PPV_ARGS(ppsl));&lt;br /&gt;                                }&lt;br /&gt;                            }&lt;br /&gt;                            PropVariantClear(&amp;amp;propvar);&lt;br /&gt;                        }&lt;br /&gt;                        pps-&amp;gt;Release();&lt;br /&gt;                    }&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;else&lt;/span&gt;&lt;br /&gt;        {&lt;br /&gt;            hr = HRESULT_FROM_WIN32(GetLastError());&lt;br /&gt;        }&lt;br /&gt;        psl-&amp;gt;Release();&lt;br /&gt;    }&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; hr;&lt;br /&gt;}&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;To start with, again we need to use COM and CoCreate to create an IShellLink COM object. A quick look at the SDK reveals that the IShellLink object has many functions. Here are few that we will use:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;b&gt;GetPath&lt;/b&gt; Gets the path and file name of a Shell link object, that is the path to the executable &lt;/li&gt;

  &lt;li&gt;&lt;b&gt;GetShowCmd&lt;/b&gt; Gets the show command for a Shell link object, the executable name &lt;/li&gt;

  &lt;li&gt;&lt;b&gt;SetArguments&lt;/b&gt; Sets the command-line arguments for a Shell link object &lt;/li&gt;

  &lt;li&gt;&lt;b&gt;SetDescription&lt;/b&gt; Sets the description for a Shell link object; the description can be any application-defined string &lt;/li&gt;

  &lt;li&gt;&lt;b&gt;SetIconLocation&lt;/b&gt; Sets the location (path and index) of the icon for a Shell link object &lt;b&gt;SetPath&lt;/b&gt; Sets the path and file name of a Shell link object &lt;/li&gt;

  &lt;li&gt;&lt;b&gt;SetWorkingDirectory&lt;/b&gt; Sets the name of the working directory for a Shell link object &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;As you can see, for each parameter we must get and set appropriate methods. There are additional parameters; take a look at the SDK - &lt;a href="http://msdn.microsoft.com/en-us/library/bb774950(VS.85).aspx"&gt;IShellLink&lt;/a&gt; if you want to learn more.&lt;/p&gt;

&lt;p&gt;In the above example, we set the path to Notepad (by default in the Windows 7 installation, c:\windows\notepad.exe). We also passed a hard-coded (not a good practice) command line argument pointing to a text file in my private document folder (C:\Users\&amp;lt;my user&amp;gt;\Documents\new text file.txt.) The rest of the code sets the title property that is required on Jump List items.&lt;/p&gt;

&lt;p&gt;We call the &lt;b&gt;CreateShellLink2&lt;/b&gt; and &lt;b&gt;CreateShellLink&lt;/b&gt; a few more times to add all three shortcuts as shown in the above screen capture. &lt;/p&gt;

&lt;p&gt;Now let’s add a separator.&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;To add a separator to our Task List, we need to create an IShellLink, and set the PKEY_AppUserModel_IsDestListSeparator property using the COM property variant as shown in the following code snippet:&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;span style="color: #008000"&gt;// The Tasks category of Jump Lists supports separator items. &lt;/span&gt;&lt;br /&gt;&lt;span style="color: #008000"&gt;// These are simply IShellLink instances that have the &lt;/span&gt;&lt;br /&gt;&lt;span style="color: #008000"&gt;//  PKEY_AppUserModel_IsDestListSeparator property set to TRUE. &lt;/span&gt;&lt;br /&gt;&lt;span style="color: #008000"&gt;// All other values are ignored when this property is set.&lt;/span&gt;&lt;br /&gt;HRESULT _CreateSeparatorLink(IShellLink **ppsl)&lt;br /&gt;{&lt;br /&gt;    IPropertyStore *pps;&lt;br /&gt;    HRESULT hr = CoCreateInstance(&lt;br /&gt;                    CLSID_ShellLink, &lt;br /&gt;                    NULL, &lt;br /&gt;                    CLSCTX_INPROC_SERVER, &lt;br /&gt;                    IID_PPV_ARGS(&amp;amp;pps));&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (SUCCEEDED(hr))&lt;br /&gt;    {&lt;br /&gt;        PROPVARIANT propvar;&lt;br /&gt;        hr = InitPropVariantFromBoolean(&lt;span style="color: #0000ff"&gt;TRUE&lt;/span&gt;, &amp;amp;propvar);&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (SUCCEEDED(hr))&lt;br /&gt;        {&lt;br /&gt;            hr = pps-&amp;gt;SetValue(PKEY_AppUserModel_IsDestListSeparator, propvar);&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (SUCCEEDED(hr))&lt;br /&gt;            {&lt;br /&gt;                hr = pps-&amp;gt;Commit();&lt;br /&gt;                &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (SUCCEEDED(hr))&lt;br /&gt;                {&lt;br /&gt;                    hr = pps-&amp;gt;QueryInterface(IID_PPV_ARGS(ppsl));&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;            PropVariantClear(&amp;amp;propvar);&lt;br /&gt;        }&lt;br /&gt;        pps-&amp;gt;Release();&lt;br /&gt;    }&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; hr;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;Here you can see that we used &lt;strong&gt;CoCreate&lt;/strong&gt; to create an &lt;strong&gt;IShellLink&lt;/strong&gt; object. Next, we set a PROPVARIANT, &lt;b&gt;propvar&lt;/b&gt;, to true and set the &lt;strong&gt;IShellLink&lt;/strong&gt; object &lt;strong&gt;PKEY_AppUserModel_IsDestListSepar&lt;/strong&gt;ator property to true. This will instruct the OS to render this &lt;strong&gt;IShellLink&lt;/strong&gt; as a separator and not just as regular &lt;strong&gt;IShellLink&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;OK, that was long. Now let’s look at the short version, using .NET. For that we are going to use the &lt;a href="http://windowsteamblog.com/blogs/developers/archive/2009/05/18/windows-7-managed-code-apis.aspx"&gt;Windows API Code pack for the .NET Framework&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;As we can expect from .NET, we get abstraction from most of the “COM code behind” that is required. The &lt;strong&gt;Microsoft.WindowsAPICodePack.Shell.Taskbar&lt;/strong&gt; namespace includes a &lt;b&gt;JumpListLink&lt;/b&gt; object that extends the &lt;b&gt;ShellLink&lt;/b&gt; object and implements &lt;b&gt;IJumpListTasks&lt;/b&gt;.&lt;/p&gt;

&lt;p&gt;The &lt;b&gt;JumpList&lt;/b&gt; class contains the &lt;b&gt;UserTasks&lt;/b&gt; collection of &lt;b&gt;IJumpListTasks&lt;/b&gt; to which you can simple add new &lt;b&gt;JumpListLink&lt;/b&gt; objects as shown in the following code snippet:&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;span style="color: #008000"&gt;// Path to Windows system folder&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;string&lt;/span&gt; systemFolder = &lt;br /&gt;        Environment.GetFolderPath(Environment.SpecialFolder.System);&lt;br /&gt;&lt;br /&gt;jumpList.UserTasks.Add(&lt;span style="color: #0000ff"&gt;new&lt;/span&gt; JumpListLink&lt;br /&gt;{&lt;br /&gt;    Title = &lt;span style="color: #006080"&gt;&amp;quot;Open Notepad&amp;quot;&lt;/span&gt;,&lt;br /&gt;    Path = Path.Combine(systemFolder, &lt;span style="color: #006080"&gt;&amp;quot;notepad.exe&amp;quot;&lt;/span&gt;),&lt;br /&gt;    IconReference = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; IconReference(&lt;br /&gt;(systemFolder, &lt;span style="color: #006080"&gt;&amp;quot;notepad.exe&amp;quot;&lt;/span&gt;), 0)&lt;br /&gt;});&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;Using the C# 3.0 syntax, we initialize a new &lt;b&gt;JumpListLink&lt;/b&gt; object and add it to the &lt;b&gt;UserTasks&lt;/b&gt; collection. As you can see, the managed code &lt;b&gt;JumpListLink&lt;/b&gt; has very similar properties to the native one (which makes perfect sense). We also added an icon to the Notepad shortcut to the above code, but didn't provide any command line parameters. &lt;/p&gt;

&lt;p&gt;You want to add a separator? Well, that is also very easy: just add a &lt;b&gt;JumpListSeperator&lt;/b&gt; object to the UserTasks collection.&lt;/p&gt;

&lt;div&gt;
  &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;jumpList.UserTasks.Add(&lt;span style="color: #0000ff"&gt;new&lt;/span&gt; JumpListSeparator());&lt;/pre&gt;
&lt;/div&gt;

&lt;div&gt;Please note that, as always, when working with the Windows Code pack API Taskbar, you have to call the “refresh” function in order to commit the changes, as we explained in the previous post. &lt;/div&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;Taskbar.JumpList.RefreshTaskbarList();&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;After the refresh, the Jump List looks as follows:&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;&lt;a href="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/developers/image_5F00_7284C851.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/developers/image_5F00_thumb_5F00_5607D671.png" width="239" height="233" /&gt;&lt;/a&gt; 

  &lt;br /&gt;&lt;/div&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;I’ve compiled a version of a native example from the Windows 7 SDK. You can get a copy of that code from &lt;a href="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/developers.CodeSamples/CustomJumpList.zip"&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can &lt;a href="http://code.msdn.microsoft.com/WindowsAPICodePack"&gt;download the Windows API Code Pack&lt;/a&gt; that includes the manage code example we used in this post. &lt;/p&gt;

&lt;p&gt;This concludes our Jump List discussion. Our next Taskbar topic is Icon Overlay.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://windowsteamblog.com/aggbug.aspx?PostID=518119" width="1" height="1"&gt;</description><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Windows+7/default.aspx">Windows 7</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Developers/default.aspx">Developers</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Microsoft/default.aspx">Microsoft</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Taskbar/default.aspx">Taskbar</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/.NET/default.aspx">.NET</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Sample+Code/default.aspx">Sample Code</category></item><item><title>Developing for the Windows 7 Taskbar – Jump into Jump Lists – Part 2</title><link>http://windowsteamblog.com/blogs/developers/archive/2009/06/25/developing-for-the-windows-7-taskbar-jump-into-jump-lists-part-2.aspx</link><pubDate>Fri, 26 Jun 2009 01:19:07 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:517510</guid><dc:creator>Yochay Kiriaty</dc:creator><slash:comments>13</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://windowsteamblog.com/blogs/developers/rsscomments.aspx?PostID=517510</wfw:commentRss><comments>http://windowsteamblog.com/blogs/developers/archive/2009/06/25/developing-for-the-windows-7-taskbar-jump-into-jump-lists-part-2.aspx#comments</comments><description>&lt;p&gt;This is the second post about the Taskbar Jump List in a series of Windows 7 Taskbar posts. In the previous post, &lt;a href="http://windowsteamblog.com/blogs/developers/archive/2009/06/22/developing-for-the-windows-7-taskbar-jump-into-jump-lists-part-1.aspx"&gt;Developing for the Windows 7 Taskbar – Jump into Jump Lists – Part 1&lt;/a&gt;, we introduced the elements that comprise the Taskbar Jump Lists: the destination (also referred to as “nouns”) and the Tasks (also referred to as “verbs”). As developer, you have a large amount of control over these elements. In this post, we walk through the different APIs that you can use when programming the Taskbar Jump Lists. &lt;/p&gt;  &lt;p&gt;Before we begin, there is one very important thing you need to know. “Items” in the Recent category, or in any other category (any destination), &lt;b&gt;must have&lt;/b&gt; a &lt;b&gt;registered file handler&lt;/b&gt; &lt;b&gt;for your application&lt;/b&gt; in the registry. This &lt;b&gt;doesn’t&lt;/b&gt; mean that your application must be the &lt;b&gt;default handler&lt;/b&gt; for that specific file type, it just means that your application must have a registered handler for &lt;b&gt;all the files &lt;/b&gt;that you want to be &lt;b&gt;visible&lt;/b&gt; in the Jump List. Therefore, “items” can only be files. Remember, by clicking on one of the items in the Jump List, the OS executes the command associated with that file as it relates to your application. When you register a file handler, you also specify the application that handles this file, and you define how to pass the input parameter for the application. Another important note to remember: All the items (files) have to be local – that is, on the local hard drive, and accessible to your application. Therefore, we can say that each and every item among the Jump List destinations is an accessible, local file, with a file handler registered to your application.&lt;/p&gt;  &lt;p&gt;As we explain in the following section, once you have registered your file handlers, the OS actually helps you keep track of all your files. We will cover file handler registration in the next post. &lt;/p&gt;  &lt;p&gt;&lt;b&gt;Step 1 – Use the Out-of-the-Box Windows Experience and Default Behavior&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;By default, a Jump List contains a &lt;i&gt;Recent&lt;/i&gt; category that is populated &lt;b&gt;automatically&lt;/b&gt; for file-based applications through the &lt;b&gt;&lt;i&gt;SHAddToRecentDocs&lt;/i&gt;&lt;/b&gt; function. This function adds the used “item” (file) to the Shell's list of recently used documents. In addition to updating its list of recent documents, the Shell adds a shortcut to the user's &lt;i&gt;Recent&lt;/i&gt; directory. The Windows 7 Taskbar uses that list and the Recent directory to populate the list of recent items in the Jump Lists. &lt;/p&gt;  &lt;p&gt;Windows can also do the work for you if your application's file type is registered. Anytime you double click on a file type with a registered handler, before Windows launches your application it automatically calls &lt;b&gt;&lt;i&gt;SHAddToRecentDocs&lt;/i&gt;&lt;/b&gt; on your application's behalf. This inserts the item in the Windows Recent list and eventually into the Jump List Recent Category. The same automatic behavior occurs when using the Windows &lt;b&gt;Common File Dialog&lt;/b&gt; (CFD) to open files through our applications. Therefore, this is another good reason to use the CFD introduced in the Windows Vista timeframe, and it also plays a vital role regarding libraries, as we explained in the &lt;a href="http://windowsteamblog.com/blogs/developers/archive/2009/04/16/light-up-with-windows-7-libraries.aspx"&gt;Light Up with Windows 7 Libraries&lt;/a&gt; post. &lt;/p&gt;  &lt;p&gt;Both of the above cases exploit default Windows behavior in cases where you have a registered handler and an Application ID by which the files are associated with &lt;i&gt;Recent&lt;/i&gt; and &lt;i&gt;Frequent&lt;/i&gt; lists. In both cases, Windows automatically inserts the items into the Jump Lists unless you &lt;b&gt;specifically&lt;/b&gt; remove this functionality by using the COM API. Obviously, users also have the option to remove any items from their Jump Lists. By explicitly removing an item from the Jump List, you insert it into the Removed Items List, which we will discuss below.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Step 2 – Create Your Own Category &lt;/b&gt;&lt;/p&gt;  &lt;p&gt;If the default &lt;i&gt;Recent&lt;/i&gt; or &lt;i&gt;Frequent&lt;/i&gt; categories do not meet your application's needs, it is time to create your own &lt;i&gt;custom&lt;/i&gt; category. In order to do so, you need to use the &lt;strong&gt;ICustomDestinationList&lt;/strong&gt; interface to create a custom Destination List.&lt;/p&gt;  &lt;p&gt;The &lt;strong&gt;ICustomDestinationList&lt;/strong&gt; exposes methods that allow an application to provide a custom Jump List, including destinations and tasks, for display in the Taskbar. Here are the methods that we are using for the example below:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;strong&gt;AppendCategory &lt;/strong&gt;Defines a custom category and the destinations that it contains for inclusion in a custom Jump List &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;AppendKnownCategory &lt;/strong&gt;Specifies that the Frequent or Recent category should be included in the Jump List &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;BeginList &lt;/strong&gt;Initiates a building session for a custom Jump List &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;CommitList &lt;/strong&gt;Declares that the Jump List initiated by a call to &lt;strong&gt;BeginList&lt;/strong&gt; is complete and ready for display &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;The following code snippet shows how to create a new custom list called “Custom Lists” and appends a few items to it:&lt;/p&gt;  &lt;div id="codeSnippetWrapper"&gt;   &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;span style="color: #0000ff"&gt;void&lt;/span&gt; CreateJumpList()&lt;br /&gt;{    &lt;br /&gt;    ICustomDestinationList *pcdl;&lt;br /&gt;    HRESULT hr = CoCreateInstance(&lt;br /&gt;                    CLSID_DestinationList, &lt;br /&gt;                    NULL, &lt;br /&gt;                    CLSCTX_INPROC_SERVER, &lt;br /&gt;                    IID_PPV_ARGS(&amp;amp;pcdl));&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (SUCCEEDED(hr))&lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: #008000"&gt;//important to setup App Id for the Jump List&lt;/span&gt;&lt;br /&gt;        hr = pcdl-&amp;gt;SetAppID(c_szAppID);&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (SUCCEEDED(hr))&lt;br /&gt;        {&lt;br /&gt;            UINT uMaxSlots;&lt;br /&gt;            IObjectArray *poaRemoved;&lt;br /&gt;            hr = pcdl-&amp;gt;BeginList(&lt;br /&gt;                            &amp;amp;uMaxSlots, &lt;br /&gt;                            IID_PPV_ARGS(&amp;amp;poaRemoved));&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (SUCCEEDED(hr))&lt;br /&gt;            {&lt;br /&gt;                hr = _AddCategoryToList(pcdl, poaRemoved);&lt;br /&gt;                &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (SUCCEEDED(hr))&lt;br /&gt;                {&lt;br /&gt;                    pcdl-&amp;gt;CommitList();&lt;br /&gt;                }&lt;br /&gt;                poaRemoved-&amp;gt;Release();&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;Here you see that we started with a standard COM initialization call. We call CoCreateInstance to initialize the &lt;b&gt;ICustomDestinationList&lt;/b&gt; object (this is the joy of working with COM….). Next, we set the &lt;a href="http://windowsteamblog.com/blogs/developers/archive/2009/06/18/developing-for-the-windows-7-taskbar-application-id.aspx"&gt;Application ID&lt;/a&gt; in order to allow you to start populating items to the list. &lt;/p&gt;

&lt;p&gt;The &lt;b&gt;BeginList&lt;/b&gt; function initiated the build session for the custom Jump List. This function returns the maximum number of items that can fit in a given Jump List; the default is 10. You may note the &lt;b&gt;Remove&lt;/b&gt; item parameter&lt;em&gt;, &lt;/em&gt;&lt;strong&gt;IObjectArray *poaRemoved&lt;/strong&gt;, that the &lt;strong&gt;BeginList() &lt;/strong&gt;returned as an out parameter. This holds any specific items that the user removed from the Jump List in his current session. We discuss the Removed Items List later in this post. &lt;/p&gt;

&lt;p&gt;Next we called a helper function, &lt;strong&gt;_AddCategoryToList()&lt;/strong&gt;, to do the actual work of adding items into the custom category. &lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;span style="color: #008000"&gt;// This is the helper function that actually appends the items to a collection &lt;/span&gt;&lt;br /&gt;&lt;span style="color: #008000"&gt;// object HRESULT _AddCategoryToList(ICustomDestinationList *pcdl, &lt;/span&gt;&lt;br /&gt;&lt;span style="color: #008000"&gt;// IObjectArray *poaRemoved)&lt;/span&gt;&lt;br /&gt;{&lt;br /&gt;    IObjectCollection *poc;&lt;br /&gt;    HRESULT hr = CoCreateInstance&lt;br /&gt;                    (CLSID_EnumerableObjectCollection, &lt;br /&gt;                    NULL, &lt;br /&gt;                    CLSCTX_INPROC_SERVER, &lt;br /&gt;                    IID_PPV_ARGS(&amp;amp;poc));&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (SUCCEEDED(hr))&lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;for&lt;/span&gt; (UINT i = 0; i &amp;lt; ARRAYSIZE(c_rgpszFiles); i++)&lt;br /&gt;        {&lt;br /&gt;            IShellItem *psi;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (SUCCEEDED(SHCreateItemInKnownFolder(&lt;br /&gt;                                FOLDERID_Documents, &lt;br /&gt;                                KF_FLAG_DEFAULT, &lt;br /&gt;                                c_rgpszFiles[i], &lt;br /&gt;                                IID_PPV_ARGS(&amp;amp;psi)))&lt;br /&gt;                )&lt;br /&gt;            {&lt;br /&gt;                &lt;span style="color: #0000ff"&gt;if&lt;/span&gt;(!_IsItemInArray(psi, poaRemoved))&lt;br /&gt;                {&lt;br /&gt;                    poc-&amp;gt;AddObject(psi);&lt;br /&gt;                }&lt;br /&gt;&lt;br /&gt;                psi-&amp;gt;Release();&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        IObjectArray *poa;&lt;br /&gt;        hr = poc-&amp;gt;QueryInterface(IID_PPV_ARGS(&amp;amp;poa));&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (SUCCEEDED(hr))&lt;br /&gt;        {&lt;br /&gt;            pcdl-&amp;gt;AppendCategory(L&lt;span style="color: #006080"&gt;&amp;quot;Custom category&amp;quot;&lt;/span&gt;, poa);&lt;br /&gt;            poa-&amp;gt;Release();&lt;br /&gt;        }&lt;br /&gt;        poc-&amp;gt;Release();&lt;br /&gt;    }&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; hr;&lt;br /&gt;}&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;Another new interface that we use is the &lt;b&gt;IObjectCollection&lt;/b&gt; that represents a collection of objects that support &lt;b&gt;IUnknown. &lt;/b&gt;To this collection we add &lt;a href="http://msdn.microsoft.com/en-us/library/bb761144.aspx"&gt;&lt;b&gt;IShellItems&lt;/b&gt;&lt;/a&gt;. Each item (file) that we added to the Jump List is of an &lt;b&gt;&lt;i&gt;IShellItem&lt;/i&gt;&lt;/b&gt; type. In the above code, we created a Shell item object for a single file that exists inside a known folder, Documents. However, before we actually added the new item to the collection, we needed to determine if the user had already removed it. If the user explicitly removed an item from the Jump List, that item will be in the &lt;i&gt;Removed Items List&lt;/i&gt; (again associated with the AppID), and, as developers, we need to respect the user's requests and avoid adding that item to the Jump List. We already have the list of removed items, &lt;b&gt;&lt;i&gt;IObjectArray *poaRemoved&lt;/i&gt;&lt;/b&gt;, that we got when we called the &lt;strong&gt;BeginList(…) &lt;/strong&gt;function when we initiated creation of a new list. &lt;/p&gt;

&lt;p&gt;At this stage, you have a collection of Shell items that the user expects to see in the Jump List. Next we added that collection to the &lt;strong&gt;ICustomDestinationList &lt;/strong&gt;object and created a new category named “&lt;i&gt;Custom category&lt;/i&gt;”, &lt;strong&gt;pcdl-&amp;gt;AppendCategory (L&amp;quot;Custom category&amp;quot;, poa);&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;So now you have successfully created a new category in the Taskbar called “Custom category” and populated it with four items. However, our work is not done yet. The final step in the CreateJumpList function is to call CommitList() to end the “transaction” that began with calling BeginList(). Only after our call to CommitList()&lt;b&gt; &lt;/b&gt;are&lt;b&gt; &lt;/b&gt;the new category and new items displayed. Calling CommitList() causes the stored list of removed items to be cleared and a new Removed Items List to begin. The ICustomDestinationList interface provides a &amp;quot;transactional base&amp;quot; API. &lt;/p&gt;

&lt;p&gt;In order to ensure a positive end user experience, make sure that a safe copy of the new repopulated list is complete and ready for use, and that the only operation the Taskbar must perform is to switch the pointer to the new list. The end result looks like:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/developers/image_5F00_3D4A7529.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/developers/image_5F00_thumb_5F00_0E84BC87.png" width="451" height="367" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;Using the &lt;a href="http://windowsteamblog.com/blogs/developers/archive/2009/05/18/windows-7-managed-code-apis.aspx" target="_blank"&gt;Windows API Code Pack&lt;/a&gt; we can write the same application using managed code.&lt;/p&gt;

&lt;p&gt;Once we are sure that we are using the same &lt;strong&gt;AppID&lt;/strong&gt; with all the Taskbar elements, we can create an instance of the Taskbar Jump List for the button that we are working on, as shown in the following code snippet. This code snippet is part of the &lt;strong&gt;CTOR&lt;/strong&gt; of the main application window:&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;span style="color: #008000"&gt;// Set the application specific id&lt;/span&gt;&lt;br /&gt;Taskbar.AppId = appId;&lt;br /&gt;&lt;span style="color: #008000"&gt;// Retrieve the taskbar jump list&lt;/span&gt;&lt;br /&gt;jumpList = Taskbar.JumpList;&lt;br /&gt;category1 = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; CustomCategory(&lt;span style="color: #006080"&gt;&amp;quot;Custom Category 1&amp;quot;&lt;/span&gt;);&lt;br /&gt;category2 = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; CustomCategory(&lt;span style="color: #006080"&gt;&amp;quot;Custom Category 2&amp;quot;&lt;/span&gt;);&lt;br /&gt;&lt;span style="color: #008000"&gt;// Add custom categories&lt;/span&gt;&lt;br /&gt;jumpList.CustomCategories.Add(category1);&lt;br /&gt;jumpList.CustomCategories.Add(category2);&lt;br /&gt;&lt;span style="color: #008000"&gt;// Default values for jump lists&lt;/span&gt;&lt;br /&gt;comboBoxKnownCategoryType.SelectedItem = &lt;span style="color: #006080"&gt;&amp;quot;Recent&amp;quot;&lt;/span&gt;;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;Here you can see that we set the &lt;strong&gt;AppID&lt;/strong&gt; using the &lt;strong&gt;AppId&lt;/strong&gt; property and created an instance of the Taskbar Jump List using the Taskbar.&lt;strong&gt;JumpList&lt;/strong&gt; static property. We also create two categories, named Custom Category 1 and Custom Category 2. Next, we add these categories to the Jump List custom categories container. Last we set the Known category of this Taskbar Jump List to Recent. This will automatically get populated as described above. &lt;/p&gt;

&lt;p&gt;After we set up the custom category, it is time to put some content in it. To do so, we just need to call the &lt;b&gt;Add&lt;/b&gt; function to add a &lt;b&gt;JumpListItem&lt;/b&gt; to the &lt;b&gt;JumpListCollection&lt;/b&gt;. The &lt;strong&gt;JumpListItemCollection&lt;/strong&gt; is a generic collection (of&amp;lt;IJumpListItem&amp;gt;) holding &lt;b&gt;IJumpListItem &lt;/b&gt;items. &lt;strong&gt;IJumpListItem&lt;/strong&gt; item is basically some sort of wrapper for the native IShellItem. &lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;span style="color: #008000"&gt;// Specify path for shell item&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;string&lt;/span&gt; path = String.Format(&lt;span style="color: #006080"&gt;&amp;quot;{0}\\test{1}.txt&amp;quot;&lt;/span&gt;,&lt;br /&gt;                            executableFolder,&lt;br /&gt;                            category1.JumpListItems.Count);&lt;br /&gt;&lt;span style="color: #008000"&gt;// Add shell item to custom category&lt;/span&gt;&lt;br /&gt;category1.JumpListItems.Add(&lt;span style="color: #0000ff"&gt;new&lt;/span&gt; JumpListItem(path));&lt;/pre&gt;
&lt;/div&gt;

&lt;div&gt;First, we need to construct a path to the file we want to include in the Jump List. Please remember that we can call the Add function only if this file is local and accessible to your user. The above code (along with a few other methods that we will describe in future posts), results in a Taskbar dialog that looks like: &lt;/div&gt;

&lt;div&gt;&lt;a href="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/developers/image_5F00_6D9149DF.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/developers/image_5F00_thumb_5F00_4C9DD738.png" width="371" height="434" /&gt;&lt;/a&gt; &lt;/div&gt;

&lt;div&gt;Finally, we need to call the Taskbar.&lt;strong&gt;JumpList.RefreshTaskbarList() &lt;/strong&gt;Function. As with the native Jump List implementation, we need to “commit” the changes made to the Jump List. A closer look at this Refresh function (you have access to it in the Code Pack API) shows a call to the &lt;strong&gt;AppendCustomCategories&lt;/strong&gt; function that appends any custom categories to the Taskbar button Jump List. Within this function, you can find a managed code implementation of the native code shown above. It includes a call to the &lt;strong&gt;AppendCateogry&lt;/strong&gt; function that is a wrapper for the native &lt;strong&gt;AppendCategory&lt;/strong&gt; function above.&lt;/div&gt;

&lt;div&gt;&amp;#160;&lt;/div&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;IObjectCollection categoryContent =&lt;br /&gt;    (IObjectCollection)&lt;span style="color: #0000ff"&gt;new&lt;/span&gt; CEnumerableObjectCollection();&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #008000"&gt;// Add each link's shell representation to the object array&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;foreach&lt;/span&gt; (IJumpListItem link &lt;span style="color: #0000ff"&gt;in&lt;/span&gt; category.JumpListItems)&lt;br /&gt;    categoryContent.AddObject(link.GetShellRepresentation());&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #008000"&gt;// Add current category to destination list&lt;/span&gt;&lt;br /&gt;HRESULT hr = customDestinationList.AppendCategory(&lt;br /&gt;    category.Name,&lt;br /&gt;    (IObjectArray)categoryContent);&lt;br /&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;div&gt;&amp;#160;&lt;/div&gt;

&lt;p&gt;As you can see, it is easy to opt into the Windows 7 Taskbar functionality. Windows automatically performs most of the work for you and, if you do need to create your own category, that is also very easy. &lt;/p&gt;

&lt;p&gt;In the next post we will describe how you can add new Tasks to the Jump List and how to register a file handler.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://windowsteamblog.com/aggbug.aspx?PostID=517510" width="1" height="1"&gt;</description><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Windows+7/default.aspx">Windows 7</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Developers/default.aspx">Developers</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Microsoft/default.aspx">Microsoft</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Taskbar/default.aspx">Taskbar</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/.NET/default.aspx">.NET</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Sample+Code/default.aspx">Sample Code</category></item><item><title>Developing for the Windows 7 Taskbar – Jump into Jump Lists – Part 1</title><link>http://windowsteamblog.com/blogs/developers/archive/2009/06/22/developing-for-the-windows-7-taskbar-jump-into-jump-lists-part-1.aspx</link><pubDate>Tue, 23 Jun 2009 00:07:24 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:516831</guid><dc:creator>Yochay Kiriaty</dc:creator><slash:comments>26</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://windowsteamblog.com/blogs/developers/rsscomments.aspx?PostID=516831</wfw:commentRss><comments>http://windowsteamblog.com/blogs/developers/archive/2009/06/22/developing-for-the-windows-7-taskbar-jump-into-jump-lists-part-1.aspx#comments</comments><description>&lt;p&gt;Welcome to yet another Windows 7 Taskbar post. In the previous post, &lt;i&gt;&lt;a href="http://windowsteamblog.com/blogs/developers/archive/2009/06/18/developing-for-the-windows-7-taskbar-application-id.aspx"&gt;Developing for the Windows 7 Taskbar – Get to Know Your Application ID&lt;/a&gt; &lt;/i&gt;, we introduced a very important component of the underlying architecture of the Taskbar, the Application ID (AppID), which is the key controller of how different applications are grouped under the same Taskbar button. The AppID also has a direct affect on how Jump List items are aggregated and populated in the Jump List. &lt;/p&gt;  &lt;p&gt;Microsoft designed the Windows 7 Taskbar to provide users with &lt;b&gt;quick and easy&lt;/b&gt; access to those “things” they use most frequently. “Things” can be any type of content such as pictures, music, word documents or links and shortcuts to applications or folders, or any other type of “clickable” item in Windows. By quick and easy access, we mean the ability to access commonly used programs with a single mouse click or with a significantly reduced number of clicks per operation. Quick and easy access also means users should be able to “jump” directly to those things they want to work with and start working with them in a single mouse click. To provide this functionality, the Windows 7 Taskbar introduces the concept of “Jump Lists.” More info about the reasons and background for creating the Taskbar Jump List can be found in Chaitanya’s &lt;a href="http://blogs.msdn.com/e7/archive/2008/11/20/happy-anniversary-windows-on-the-evolution-of-the-taskbar.aspx"&gt;Engineering Windows 7: The Windows 7 Taskbar&lt;/a&gt; post, and &lt;a href="http://channel9.msdn.com/posts/yochay/Windows-7-New-Taskbar-an-overview/"&gt;Windows 7 New Taskbar - An Overview&lt;/a&gt; video on Channel 9.&lt;/p&gt;  &lt;p&gt;As much as I love talking about the reasons for creating the new Taskbar (since I love user functionality and usability in general) I am going to focus on the API for using the Taskbar. As a developer, you should think of a Jump List as your application's own mini Start Menu. Jump Lists bring to the surface commonly used destinations (nouns) and tasks (verbs) of a program. This enables easy user access to destinations by eliminating the need to launch the application and then load the relevant content, or by performing common tasks without launching the application in advance. The following picture illustrates how Jump Lists work with Microsoft Office Word 2007. You can see that under the “Recent” category, there is a list of recent documents that I’ve used with Office Word. Clicking on one of the items in the “Recent” list will launch Office Word with the relevant document already loaded.&lt;/p&gt;  &lt;table border="0" cellspacing="0" cellpadding="2" width="564"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="287"&gt;&lt;a href="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/developers/image_5F00_04084771.png"&gt;&lt;img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="image" border="0" alt="image" src="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/developers/image_5F00_thumb_5F00_1578A849.png" width="268" height="365" /&gt;&lt;/a&gt; &lt;/td&gt;        &lt;td valign="top" width="275"&gt;         &lt;br /&gt;We previously identified Word 2007 as an example of an application that “plays” nicely with the Windows 7 Taskbar even if that application was released a long time before the Windows 7 Taskbar was available. The Taskbar buttons are all grouped under the same Taskbar icon and the Jump list is automatically populated with the most recently used Word documents. In the next post, I will explain in detail how Jump List are populated automatically like Office Word 2007 and word documents. For this post, let’s focus on the different Jump Lists players.           &lt;br /&gt;          &lt;br /&gt;&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;The default Out-of-The-Box tasks that are shipped provide the means to launch a new instance of the application, to pin or unpin an application to the taskbar, and to close the application. You can access the Jump List by right clicking on an application icon in the Taskbar. However, as the following picture illustrates, you can opt to take more control of the Taskbar experience by customizing the context of the Jump List for your application.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/developers/image_5F00_26E90921.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/developers/image_5F00_thumb_5F00_5B1D3267.png" width="542" height="285" /&gt;&lt;/a&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Definitions from the Windows 7 SDK:&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;”… &lt;b&gt;&lt;i&gt;Destinations&lt;/i&gt;&lt;/b&gt; are items that appear in the &lt;i&gt;Recent&lt;/i&gt;, &lt;i&gt;Frequent,&lt;/i&gt; or custom categories (the 'Important' category in the diagram above), based on the user’s item usage. Destinations can be files, folders, Web sites, or other content-based items, but are not necessarily file-backed. Destinations can be pinned to or removed from the Jump List by the user. They are generally represented by IShellItem objects, but they can also be IShellLink objects…”&lt;/p&gt;  &lt;p&gt;”…&lt;b&gt;&lt;i&gt;Tasks&lt;/i&gt;&lt;/b&gt; are common actions performed in applications that apply to all users of the application regardless of the individual usage patterns. Task can’t be pinned or removed. Tasks are represented by IShellLink objects because they are actually links (with parameters – optional) to commands – 'Actions'…”&lt;/p&gt;  &lt;p&gt;As developer, you can: &lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;&lt;b&gt;Control Application Destinations&lt;/b&gt; (that is control the items you want users to be able to “Jump” directly into and start working on)       &lt;ol&gt;       &lt;li&gt;Destinations can be any one of the known categories such as &lt;i&gt;Recent&lt;/i&gt; or &lt;i&gt;Frequent.&lt;/i&gt; &lt;/li&gt;        &lt;li&gt;The &lt;i&gt;Custom&lt;/i&gt; category is just like any other Destination category, except that it allows you to create a &lt;b&gt;new &lt;/b&gt;name for that category as well as populate it with items of your choice. &lt;/li&gt;        &lt;li&gt;The &lt;i&gt;Pinned&lt;/i&gt; category is provided for pinned items that users want to keep permanently in their Jump Lists. Please note: &lt;b&gt;ONLY users&lt;/b&gt; can pin items in the Jump List, there is NO supported programmatic way that you, as developer, can pin an item. &lt;/li&gt;        &lt;li&gt;You can completely remove the Pinned category from the Jump List so the user cannot pin items – but you might want to think twice before preventing users from pinning items in your application. &lt;/li&gt;     &lt;/ol&gt;   &lt;/li&gt;    &lt;li&gt;&lt;b&gt;Define Common User Tasks&lt;/b&gt;       &lt;ol&gt;       &lt;li&gt;The Taskbar surfaces its own out-of-the-box tasks such as launching, pinning/unpinning, or closing the application. As developers we have &lt;b&gt;no control&lt;/b&gt; over the Taskbar Tasks. However, we do control the User Tasks. &lt;/li&gt;        &lt;li&gt;User Tasks are common tasks the application developer wants to surface at the Jump List level that will enable users to perform a task directly from the Jump List (for example, &lt;i&gt;Play all&lt;/i&gt; music in media player without switching to media player). Usually, this will result in launching an instance of the application and performing the task, or launching another application, like Internet Explorer, when clicking on the “Go to MSN Home Page” task in the Windows Live Messenger Jump List as shown in the next picture. Again, all of the above Jump List functionality saves time and reduces the number of clicks needed to achieve the user's end goal, thereby making the user happy. &lt;/li&gt;     &lt;/ol&gt;   &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;&lt;a href="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/developers/image_5F00_4148FC38.png"&gt;&lt;img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="image" border="0" alt="image" src="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/developers/image_5F00_thumb_5F00_329E5053.png" width="233" height="364" /&gt;&lt;/a&gt;In the next post, we will dive into the Taskbar Jump List API. But first, we need to address the Taskbar programming model. The Taskbar exposes its set of APIs like any other Windows Shell component, through a set of COM interfaces. However, there are a few actions we developers can do even before starting to use the Windows Taskbar COM APIs. &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://windowsteamblog.com/aggbug.aspx?PostID=516831" width="1" height="1"&gt;</description><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Windows+7/default.aspx">Windows 7</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Developers/default.aspx">Developers</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Microsoft/default.aspx">Microsoft</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Taskbar/default.aspx">Taskbar</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/.NET/default.aspx">.NET</category></item><item><title>Developing for the Windows 7 Taskbar – Application ID – Part 2</title><link>http://windowsteamblog.com/blogs/developers/archive/2009/06/19/developing-for-the-windows-7-taskbar-application-id-part-2.aspx</link><pubDate>Fri, 19 Jun 2009 17:06:55 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:516770</guid><dc:creator>Yochay Kiriaty</dc:creator><slash:comments>9</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://windowsteamblog.com/blogs/developers/rsscomments.aspx?PostID=516770</wfw:commentRss><comments>http://windowsteamblog.com/blogs/developers/archive/2009/06/19/developing-for-the-windows-7-taskbar-application-id-part-2.aspx#comments</comments><description>&lt;p&gt;[June 19th - I added a code sample and new screenshots.]&lt;/p&gt;  &lt;p&gt;In response to some of the comments I included a link to the download and new screenshots to show the effect of changing Application ID in run time. And Just to make sure we are all on the same page here are two images to illustrate the power of AppID. You can clearly see that the same application (with the same original application ID) can have two different Taskbar buttons. You can also &lt;a href="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/developers.CodeSamples/Taskbar-Application-ID.zip" target="_blank"&gt;download the code for this application&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/developers/Taskbar_5F00_buttons_5F00_Multiplebuttone1_5F00_411DB221.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Taskbar_buttons_Multiplebuttone1" border="0" alt="Taskbar_buttons_Multiplebuttone1" src="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/developers/Taskbar_5F00_buttons_5F00_Multiplebuttone1_5F00_thumb_5F00_2668EE0A.png" width="558" height="340" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;a href="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/developers/Taskbar_5F00_buttons_5F00_Multiplebuttone2_5F00_2891FEA1.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Taskbar_buttons_Multiplebuttone2" border="0" alt="Taskbar_buttons_Multiplebuttone2" src="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/developers/Taskbar_5F00_buttons_5F00_Multiplebuttone2_5F00_thumb_5F00_548EAFF8.png" width="557" height="382" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Just a note as response to one of the comments. Yes you can place a different Taskbar button between to windows with different AppID!&lt;/p&gt;  &lt;p&gt;&lt;a href="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/developers.CodeSamples/Taskbar-Application-ID.zip" target="_blank"&gt;download the code for this application&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;You can find the managed code Taskbar object in the &lt;a href="http://code.msdn.microsoft.com/WindowsAPICodePack"&gt;Windows API Code pack&lt;/a&gt; project.&lt;/p&gt;  &lt;div&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://windowsteamblog.com/aggbug.aspx?PostID=516770" width="1" height="1"&gt;</description><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Windows+7/default.aspx">Windows 7</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Developers/default.aspx">Developers</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Microsoft/default.aspx">Microsoft</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Taskbar/default.aspx">Taskbar</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/.NET/default.aspx">.NET</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Sample+Code/default.aspx">Sample Code</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Source+Code/default.aspx">Source Code</category></item><item><title>Developing for the Windows 7 Taskbar – Application ID</title><link>http://windowsteamblog.com/blogs/developers/archive/2009/06/18/developing-for-the-windows-7-taskbar-application-id.aspx</link><pubDate>Thu, 18 Jun 2009 17:18:35 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:516746</guid><dc:creator>Yochay Kiriaty</dc:creator><slash:comments>36</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://windowsteamblog.com/blogs/developers/rsscomments.aspx?PostID=516746</wfw:commentRss><comments>http://windowsteamblog.com/blogs/developers/archive/2009/06/18/developing-for-the-windows-7-taskbar-application-id.aspx#comments</comments><description>&lt;p&gt;This is the first post in a new Windows 7 Taskbar series. One of the first Windows 7 changes that developers should pay attention to is the new Windows Taskbar. We all need to understand the functionality this feature introduces so that we can ensure that our applications work well with the Taskbar, resulting in an enhanced experience for our end users.&lt;/p&gt;  &lt;p&gt;I assume that by now you are familiar with the basic functionality that Windows 7 Taskbar offers and the reasons behind the change we made from previous taskbar versions. If you are not familiar with and haven’t seen any demonstrations of the Windows 7 Taskbar, please watch the &lt;a href="http://channel9.msdn.com/posts/yochay/Windows-7-New-Taskbar-an-overview/"&gt;Windows 7 Taskbar Overview&lt;/a&gt; webcast on Channel 9. There are also great posts on the E7 blog like &lt;a href="http://blogs.msdn.com/e7/archive/2008/11/20/happy-anniversary-windows-on-the-evolution-of-the-taskbar.aspx"&gt;The Windows 7 Taskbar&lt;/a&gt; about some of the reasons we introduced the new Taskbar and desktop experience in Windows 7. I do encourage you to read these posts and watch the video so that you have some context for the technical material we are going to cover here.&lt;/p&gt;  &lt;p&gt;The new Taskbar is probably the most noticeable change to Windows 7 when you first log on. The Windows 7 Taskbar is an application-launching and window-switching mechanism that consolidates the functions of previous Windows Desktop mechanisms, such as Quick Launch, Recent Documents, Notification Area icons, desktop shortcuts, and running application windows. Windows 7 Taskbar offers features like Jump Lists, Preview Handler, and Overlay Icons. But before we start diving into the various Windows 7 Taskbar features, let’s lay the basic foundation to our discussion and define some Windows 7 taskbar terminology. &lt;/p&gt;  &lt;p&gt;The basic component is the Taskbar button. The Taskbar button is represented as an icon displayed on the Taskbar. As you can see in the following image, the Taskbar contains several buttons. You can tell what their status is by how they are displayed.&lt;a href="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/developers/Taskbar_5F00_buttons1_5F00_328301CE.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Taskbar_buttons1" border="0" alt="Taskbar_buttons1" src="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/developers/Taskbar_5F00_buttons1_5F00_thumb_5F00_2A8B5F6C.png" width="564" height="137" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;For example, the Media Player button has no frame or border, but simply sits directly on the Taskbar. This indicates that Media Player is not running. But it is pinned to the Taskbar, and will stay on the Taskbar unless we unpin it. A transparent frame that lets most of the color of the underlying Taskbar through the Windows Explorer button. This indicates that the app is running but is not the active application. The Visual Studio icon has a more opaque rectangular frame underlying its icon indicating that the user is actively using this app. You will also notice that Word has a “stack” of icons representing that multiple instances of Word or multiple Windows are grouped under the same Taskbar button. It is very important to understand the logic that underlies the creation, assignment, and grouping of Taskbar buttons. &lt;/p&gt;  &lt;p&gt;A very large number of applications that run on Windows 7 (for example, Office Word 2007 and Visual Studio 2008), were not designed to work with the Windows 7 Taskbar, so how is it that they can play ball with the Taskbar, group multiple instances, and even take advantage of Word Jump Lists? Basically, a behind-the-scenes Application ID (AppID) is automatically computed and assigned to an application once you launch it. Every running application has an AppID assigned to it, either automatically computed for the app by Windows, or set by the app itself. Guess what? It is not a GUID; it is just a string (with a maximum of 128 characters), that either you provide or is being computed by the OS. All windows and applications, including Jump Lists, which have the same AppID are grouped under the same Taskbar button. Therefore, it is important to understand that every component (process, shortcut, window, Taskbar button, and document type – that is, registered file type handler) of your application has the AppID associated with it.&lt;/p&gt;  &lt;p&gt;You may ask, &amp;quot;Where do AppIDs come from?&amp;quot; As mentioned before, the OS generates Application IDs for your application using a very simple, yet important to understand heuristic. Since in Windows 7 you can assign AppIDs to individual windows, the OS tries to extrapolate the AppID from a window. Applications usually display at least one window that the OS can query for its AppID. However, most existing apps do not have an AppID attached to each window (or, for that matter, any AppID at all), and therefore the OS falls back to the process to which the window belongs for the AppID. Each process has several properties that the OS can check, like the executable of the process. But even then, the process may not provide a granular enough separation. Different shortcuts may provide different start up command line parameters to the same executable and launch different applications (imagine a “launcher” application) that will be grouped under the same Taskbar button. In such cases, the OS has the ability to look into the specific shortcut that launched the application, to find the executable, the command line parameters, and so on. Note that if you have a register file, this registration points to an application that gets launched once you double click that file. Again, this is another way to calculate the AppID. The following image illustrates this automatic computation process. &lt;a href="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/developers/image_5F00_709C1C7F.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/developers/image_5F00_thumb_5F00_21BB5720.png" width="553" height="337" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;If you are interested in really understanding the internals of the Windows 7 taskbar, a great Channel 9 video describes its underlying architecture. Watch the Rob Jarrett and Ben Bets &lt;a href="http://channel9.msdn.com/posts/yochay/Windows-7-Taskbar-Behind-the-Scenes/"&gt;Windows 7 Taskbar - Behind the Scenes&lt;/a&gt; video and, specifically for the Application ID overview, watch &lt;a href="http://channel9.msdn.com/posts/yochay/Jump-into-the-Windows-7-Taskbar-Jump-Lists/"&gt;Jump into the Windows 7 Taskbar Jump Lists&lt;/a&gt; (between 29:30 and 34:40).&lt;/p&gt;  &lt;p&gt;While the OS can compute AppIDs for you, you may want to have greater control over the AppID for a given application or even an individual window in your application. Assume that you have an application that hosts (runs) another application (like what happens when you debug an application using Visual Studio). Or you have several different applications or processes that you wish to group under the same Taskbar button. The Taskbar API offers you ways to control the Application ID per application or per window. IN ANY CASE, if you are writing a &lt;b&gt;new&lt;/b&gt; application that targets Windows 7, we &lt;b&gt;highly recommend&lt;/b&gt; that you provide your own application ID, as we will describe below. &lt;/p&gt;  &lt;p&gt;OK, let’s examine the API that allows you to control the AppID associations of your application.&lt;/p&gt;  &lt;p&gt;If you want to have a separate Taskbar button for each &lt;i&gt;process&lt;/i&gt; (including all windows owned by that process), you can set an explicit AppID for the entire process that affects all windows within the process that do not have their own explicit AppID. Setting the explicit process AppID is very easy. All it takes is a single call to the &lt;a href="http://msdn.microsoft.com/en-us/library/dd378422(VS.85).aspx"&gt;SetCurrentProcessExplicitAppUserModelID&lt;/a&gt; function as shown in the following code snippet:&lt;/p&gt;  &lt;div id="codeSnippetWrapper"&gt;   &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;SetCurrentProcessExplicitAppUserModelID(c_rgszAppID[0]);&lt;/pre&gt;
Where c_rgszAppID[0] is a pointer to a string. You should note that according to the SDK documentation, &lt;em&gt;“This method must be called during an application's initial startup routine before the application presents any user interface (UI) or makes any manipulation of its Jump Lists.”&lt;/em&gt; 

  &lt;br /&gt;&lt;/div&gt;

&lt;p&gt;In managed code, from the latest &lt;a href="http://code.msdn.microsoft.com/WindowsAPICodePack"&gt;Windows API Code Pack Library&lt;/a&gt;, you can use the &lt;b&gt;&lt;i&gt;AppID &lt;/i&gt;&lt;/b&gt;property that is part of the &lt;b&gt;&lt;i&gt;Taskbar&lt;/i&gt;&lt;/b&gt; object, which you can find in the &lt;i&gt;Microsoft.WindowsAPICodePack.Shell.Taskbar &lt;/i&gt;namespace. Using that property you can set and get the application ID of a given application. &lt;/p&gt;

&lt;p&gt;Setting the AppID for a window is a bit more complicated (but only a bit). It requires calling the &lt;a href="http://msdn.microsoft.com/en-us/library/dd378430(VS.85).aspx"&gt;SHGetPropertyStoreForWindow&lt;/a&gt; function and then manipulating the resulting &lt;a href="http://msdn.microsoft.com/en-us/library/bb761474(VS.85).aspx"&gt;IPropertyStore&lt;/a&gt; object to retrieve the requested property as shown in the following code snippet:&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;span style="color: #0000ff"&gt;void&lt;/span&gt; SetAppID(HWND hWnd, &lt;span style="color: #0000ff"&gt;int&lt;/span&gt; iAppID)&lt;br /&gt;{&lt;br /&gt;    IPropertyStore *pps;&lt;br /&gt;    HRESULT hr = SHGetPropertyStoreForWindow(hWnd, IID_PPV_ARGS(&amp;amp;pps));&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (SUCCEEDED(hr))&lt;br /&gt;    {&lt;br /&gt;        PROPVARIANT pv;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (iAppID &amp;gt;= 0)&lt;br /&gt;        {&lt;br /&gt;            hr = InitPropVariantFromString(c_rgszAppID[iAppID], &amp;amp;pv);&lt;br /&gt;        }&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;else&lt;/span&gt;&lt;br /&gt;        {&lt;br /&gt;            PropVariantInit(&amp;amp;pv);&lt;br /&gt;        }&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (SUCCEEDED(hr))&lt;br /&gt;        {&lt;br /&gt;            hr = pps-&amp;gt;SetValue(PKEY_AppUserModel_ID, pv);&lt;br /&gt;            PropVariantClear(&amp;amp;pv);&lt;br /&gt;        }&lt;br /&gt;        pps-&amp;gt;Release();&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;Here you can see how we extract the current windows property store by calling SHGetPropertyStoreForWindow, passing hWnd as refrence to the window. Next we initiate, InitPropVariantFromString(c_rgszAppID[iAppID], &amp;amp;pv), a property variant with a string that represents the AppID for that window. Finally, we set the value of the new property store to the window. &lt;/p&gt;

&lt;p&gt;Unfortunately, the current Windows API Code pack doesn’t support setting specific application IDs per window, although all you need to do is add the following function to the Taskbar.cs file:&lt;/p&gt;

&lt;div&gt;
  &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;span style="color: #0000ff"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff"&gt;static&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; SetWindowAppId(&lt;span style="color: #0000ff"&gt;string&lt;/span&gt; appId)&lt;br /&gt;{&lt;br /&gt;    Microsoft.WindowsAPICodePack.Shell.ShellNativeMethods.SetWindowAppId&lt;br /&gt;        (OwnerHandle, &lt;span style="color: #006080"&gt;&amp;quot;name here&amp;quot;&lt;/span&gt;);&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;Since the Windows API Code Pack provides the source code, you can actually check the specific implementation of SetWindowAppId function and see for yourself that it is very similar to the SetAppID example above. Note you don’t have to use the full qualified assembly name “&lt;em&gt;Microsoft.WindowsAPICodePack.Shell’&lt;/em&gt;, but I did to help you navigate the Windows API Code Pack hierarchy.&lt;/p&gt;

&lt;p&gt;By the way, the window AppID is dynamic, so it’s entirely possible for a window to show up as part of one Taskbar button and then change its AppID so that it appears on an entirely different Taskbar button. This has interesting effects. For example, the Jump List is attached to a Taskbar button (with a specific AppID), so the same window might show a different Jump List when it is reattached to an entirely different Taskbar button. This potentially can confuse users, so the recommended practice is to set the window AppID and stick to it, using the same process for determining the AppID every time the window displays. &lt;/p&gt;

&lt;p&gt;You can find the managed code Taskbar object in the &lt;a href="http://code.msdn.microsoft.com/WindowsAPICodePack"&gt;Windows API Code pack&lt;/a&gt; project.&lt;/p&gt;

&lt;p&gt;[&lt;a href="http://blogs.microsoft.co.il/blogs/sasha"&gt;Sasha Goldshtein&lt;/a&gt; helped write this post, and you can find his original posting &lt;a href="http://blogs.microsoft.co.il/blogs/sasha/archive/2009/02/15/windows-7-taskbar-application-id.aspx"&gt;here&lt;/a&gt;].&lt;/p&gt;

&lt;div&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://windowsteamblog.com/aggbug.aspx?PostID=516746" width="1" height="1"&gt;</description><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Windows+7/default.aspx">Windows 7</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Developers/default.aspx">Developers</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Microsoft/default.aspx">Microsoft</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Taskbar/default.aspx">Taskbar</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/.NET/default.aspx">.NET</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Sample+Code/default.aspx">Sample Code</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Source+Code/default.aspx">Source Code</category></item><item><title>Windows 7 RC Training Kit for Developers</title><link>http://windowsteamblog.com/blogs/developers/archive/2009/06/12/windows-7-rc-training-kit-for-developers.aspx</link><pubDate>Fri, 12 Jun 2009 17:09:38 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:516507</guid><dc:creator>Yochay Kiriaty</dc:creator><slash:comments>12</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://windowsteamblog.com/blogs/developers/rsscomments.aspx?PostID=516507</wfw:commentRss><comments>http://windowsteamblog.com/blogs/developers/archive/2009/06/12/windows-7-rc-training-kit-for-developers.aspx#comments</comments><description>&lt;p&gt;This week we released the &lt;u&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=12100526-ed26-476b-8e20-69662b8546c1&amp;amp;displaylang=en" target="_blank"&gt;Windows 7 RC Training Kit for Developers&lt;/a&gt;&lt;/u&gt; as part of our ongoing effort to give you, all the Windows developers out there, and valuable content to work with while making your application shine on Windows 7. This version of the training kit includes 10 presentations and 8 Hands-On-Labs (HOL), covering most of the Windows 7 light-up features as well as application compatibility topics. Note that the HOL gives you the opportunity to get firsthand experience in programming key Windows 7 Light-Up features, such as the Taskbar, Libraries, Multi-Touch, Sensors and Location, Graphics, Ribbon, Trigger Start Services, Instrumentation and Event Tracing for Windows (ETW). We also provide a brief Application Compatibility overview. &lt;/p&gt;  &lt;table border="0" cellspacing="0" cellpadding="2" width="551"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="274"&gt;This is an “early preview” to the full set of Windows 7 Training for Developers that will be released shortly after RTM. You can &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=12100526-ed26-476b-8e20-69662b8546c1&amp;amp;displaylang=en" target="_blank"&gt;download&lt;/a&gt; the training kit and get started, but make sure you have a Windows 7 RC machine to work with, and install Visual Studio 2008 SP 1 and Windows 7 RC SDK as some of the native applications requires libraries from the SDK.&lt;/td&gt;        &lt;td valign="top" width="275"&gt;&lt;a href="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/developers/image_5F00_62F158D2.png"&gt;&lt;img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="image" border="0" alt="image" src="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/developers/image_5F00_thumb_5F00_1A576A01.png" width="240" height="209" /&gt;&lt;/a&gt; &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;&lt;/p&gt;  &lt;h3&gt;Modules:&lt;/h3&gt;  &lt;h5&gt;Taskbar&lt;/h5&gt;  &lt;p&gt;The Windows 7 Taskbar is a differentiating opportunity that allows applications to shine on the Windows 7 platform. The new Taskbar streamlines many end-user scenarios including launching applications, switching between running applications and windows within a single application, managing recent/frequent user destinations, accessing common application tasks, reporting progress and status notifications through the taskbar button, and controlling the application without leaving the taskbar thumbnail. The Taskbar is the end user’s primary point-of-contact for initiating and managing activities; as such, the integration of the new taskbar features into modern Windows 7 applications is a critically important goal. This module talks about the different aspects and APIs associated with programming the Windows 7 Taskbar. &lt;/p&gt;  &lt;h5&gt;Libraries&lt;/h5&gt;  &lt;p&gt;Libraries are the new entry points to user data. Libraries are a natural evolution of the 'My Documents' folder concept that blends into the Windows Explorer user experience. A library is a common store of user defined locations that applications can leverage to manage user content as their part of the user experience. Because libraries are not file system locations, you will need to update some applications to work with them like folders. This module explains the basic concepts underlying Windows 7 Libraries, including how to make your application library-aware, how to work with libraries as though they were file system folders, and how to leverage the library system.&lt;/p&gt;  &lt;h5&gt;Multi-Touch &lt;/h5&gt;  &lt;p&gt;Windows 7 features improved touch and gesture support that empowers developers to quickly and easily create unique application experiences that go beyond simple mouse pointing, clicking, and dragging. The new multi-touch APIs support rich gestures, such as pan, zoom, and rotate. The Windows 7 Multi-Touch Platform also provides raw touch data inputs and advance manipulation and interties. This module explains the basics of Windows 7 multi-touch and its APIs.&lt;/p&gt;  &lt;h5&gt;Sensor and Location Platform&lt;/h5&gt;  &lt;p&gt;Windows 7 has changed how developers use sensors. The Sensor and Location Platform includes native support for sensors, expanded by a new development platform for working with sensors, including location sensors such as GPS devices. Built on the Sensor platform, the new Windows Location APIs enable application developers to access the user’s physical location information. This module explains what the Sensor and Location Platform is and how to work with its APIs.&lt;/p&gt;  &lt;h5&gt;Ribbon&lt;/h5&gt;  &lt;p&gt;Windows 7 incorporates the Ribbon interface introduced in Office 2007 throughout the operating system, enabling improved user interface development on the platform. This means that developers can eliminate much of the drudgery of Win32 UI development and deliver a rich, graphical, animated, and highly familiar user interfaces by using a markup-based UI and a small, high-performance, native code runtime. The Ribbon control helps developers improve usability by exposing your application's most frequently accessed features directly to end users. The Ribbon makes it easier for end users to find and use application features because functionality is more visible, resulting in greater productivity. This module shows the different aspects of the Windows 7 Ribbon and provides a guide on how to incorporate the Windows 7 Ribbon into existing applications. &lt;/p&gt;  &lt;h5&gt;Background Processes, Services, and Tasks&lt;/h5&gt;  &lt;p&gt;Services and background processes have tremendous influence on the overall performance of the system, and therefore the applications. If we could cut down on the total number of services, we could reduce the total power consumption and increase the overall stability of the system. The Windows 7 Service Control Manager has been extended so that a service can be automatically started and stopped when a specific system event, or trigger, occurs on the system. Trigger-start capabilities remove the need for services to start up automatically at computer startup and then poll or wait for an event to occur. This module explains the different options available to developers for configuring and using trigger-start services. &lt;/p&gt;  &lt;h5&gt;Windows 7 Instrumentation and Performance&lt;/h5&gt;  &lt;p&gt;Windows 7 includes new Event Tracing for Windows (ETW) capabilities that developers can take advantage of during the development process to optimize application performance. Instrumentation has always been part of Windows, but Windows 7 includes new ETW underlying technology that makes the task of including instrumentation in your application a whole lot easier. This module describes the different options for using instrumentation in Windows, including the new ETW.&lt;/p&gt;  &lt;h5&gt;Windows 7 Application Compatibility&lt;/h5&gt;  &lt;p&gt;Windows 7 is built on top of Windows Vista, which means if your application does not work or if it has some issues when running on Windows Vista, most probably it will have similar issues running on Windows 7. This module is a short overview of the top major issues regarding Windows 7 compatibility, including Data Redirection, Service Isolation, Version Checking, and High DPI.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://windowsteamblog.com/aggbug.aspx?PostID=516507" width="1" height="1"&gt;</description><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Windows+7/default.aspx">Windows 7</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Developers/default.aspx">Developers</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Microsoft/default.aspx">Microsoft</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Multi-Touch/default.aspx">Multi-Touch</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Taskbar/default.aspx">Taskbar</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Sensor+and+Location/default.aspx">Sensor and Location</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Libraries/default.aspx">Libraries</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/.NET/default.aspx">.NET</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Sample+Code/default.aspx">Sample Code</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Windows+7+Instrumentation+and+Performance/default.aspx">Windows 7 Instrumentation and Performance</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Windows+7+Application+Compatibility/default.aspx">Windows 7 Application Compatibility</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/ETW/default.aspx">ETW</category></item><item><title>Windows 7 RC Is Here</title><link>http://windowsteamblog.com/blogs/developers/archive/2009/05/05/windows-7-rc-is-here.aspx</link><pubDate>Tue, 05 May 2009 20:51:13 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:513905</guid><dc:creator>Yochay Kiriaty</dc:creator><slash:comments>26</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://windowsteamblog.com/blogs/developers/rsscomments.aspx?PostID=513905</wfw:commentRss><comments>http://windowsteamblog.com/blogs/developers/archive/2009/05/05/windows-7-rc-is-here.aspx#comments</comments><description>&lt;p&gt;Both the &lt;a href="http://www.microsoft.com/windows/windows-7/download.aspx"&gt;Windows 7 RC&lt;/a&gt; and the &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=6db1f17f-5f1e-4e54-a331-c32285cdde0c"&gt;Windows 7 RC SDK&lt;/a&gt; are available for download; make sure you get them quickly. As Brandon mentioned in &lt;a href="http://windowsteamblog.com/blogs/windows7/archive/2009/05/05/the-windows-7-release-candidate-rc-is-here.aspx"&gt;his post&lt;/a&gt;, with this release we are coming down the home stretch to release of the final product. Now is when you need to be working on your applications to make sure they are Windows 7 Compatible. On top of that, you can use new Windows 7 features such as the Sensor and Location Platform, Taskbar, Libraries, Multi-Touch, the new Graphics APIs, the Windows Ribbon, and many other important and exciting technologies offered by Windows 7 to Light Up your applications. We covered some of these features in previous posts, and we will continue to do so.&lt;/p&gt;  &lt;p&gt;The Windows 7 RC incorporates user feedback from Beta users and includes a few new features we have already covered in &lt;a href="http://blogs.msdn.com/e7/archive/2009/02/26/some-changes-since-beta.aspx"&gt;Some Changes Since Beta for RC&lt;/a&gt; and &lt;a href="http://blogs.msdn.com/e7/archive/2009/03/13/a-few-more-changes-from-beta-to-rc.aspx"&gt;A few more changes from Beta to RC…&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;We hope that you will install the Windows 7 RC build soon so you can start testing your application and taking advantage of the new features and technologies Windows 7 offers. We’ve created a short list of resources to help get you started programming for Windows 7:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;The &lt;a href="http://msdn.microsoft.com/en-us/windows/default.aspx"&gt;Windows page&lt;/a&gt; on MSDN is the one-stop shop for Windows client developers &lt;/li&gt;    &lt;li&gt;At &lt;a href="http://msdn.microsoft.com/en-us/windows/dd433113.aspx"&gt;Develop for Windows 7&lt;/a&gt; you can find all the information you need about specific technologies like Direct2D, Taskbar, Sensor and Location, Power Shell 2, Windows Ribbon, and many more &lt;/li&gt;    &lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/windows/dd433113.aspx"&gt;Windows Application Compatibility&lt;/a&gt; is the one page you want to visit to make sure your application runs properly on Windows 7. This page includes content and tools to test and fix any application compatibility issues &lt;/li&gt;    &lt;li&gt;Directly accessible from that page, is the &lt;a href="http://msdn.microsoft.com/library/dd371778(VS.85).aspx"&gt;Windows 7 Application Quality Cookbook&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;Also still very relevant, is the &lt;a href="http://msdn.microsoft.com/en-us/library/bb757005.aspx"&gt;Windows Vista Application Compatibility Cookbook&lt;/a&gt;. Most Windows 7 compatibility issues are the direct result of the changes introduced in the Windows Vista timeframe, and are included as topics in this Cookbook (UAC, Session 0 Service Isolation, IE Protected Mode, etc.), which is a great starting point for addressing these issues &lt;/li&gt;    &lt;li&gt;New Windows 7 videos on the &lt;a href="http://channel9.msdn.com/windows"&gt;Channel 9 Windows &lt;/a&gt;page explore specific features and technologies, and are great “windows” to the Windows engineering team &lt;/li&gt;    &lt;li&gt;As always, the &lt;a href="http://blogs.msdn.com/e7"&gt;E7 blog&lt;/a&gt; is an amazing source of the engineering back story behind Windows 7&lt;/li&gt;    &lt;li&gt;For IT-Pro, we have our &lt;a href="http://technet.microsoft.com/en-us/windows/dd361745.aspx"&gt;SPRINGBOARD SERIES&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;And, of course, continue to watch for our new posts on specific Windows 7 features&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://windowsteamblog.com/aggbug.aspx?PostID=513905" width="1" height="1"&gt;</description><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Windows+7/default.aspx">Windows 7</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Developers/default.aspx">Developers</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Microsoft/default.aspx">Microsoft</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Multi-Touch/default.aspx">Multi-Touch</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Taskbar/default.aspx">Taskbar</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Sensor+and+Location/default.aspx">Sensor and Location</category><category domain="http://windowsteamblog.com/blogs/developers/archive/tags/Libraries/default.aspx">Libraries</category></item></channel></rss>