Wednesday, January 21, 2009

Pimping your Win7 Taskbar – Extending the Win7 Taskbar with Managed Code

CodePlexWindows 7 Managed Taskbar Extensions

Overview

Windows 7 introduces a new Taskbar concept which greatly improves the usability of Windows applications.

Not only these new concepts are implemented in Microsoft applications like Internet Explorer, Windows Media Player, Windows Live Messenger, etc. but also they are exposed to 3rd parties via unmanaged (COM and Win32) Taskbar Extensions APIs. The new functionalities introduced are: The goal of this project to provide a managed .NET API on top of this unmanaged API. The project is implemented in C# and can be referenced from any .NET Windows application.

The following features are currently implemented in this library:

…” [Project description leach level: 90%]

While the project is still in alpha, but with all the coolness (and hype) around the new Win7 Taskbar, when Hüseyin tweeted me a link to this I thought it was pretty cool. I think the Progress Bars in the new Taskbar is going to be one of those “what did we ever do without this” features of Win7. A small thing, but all big things are really just lots and lots of small things…

The new Win7 Taskbar is pretty neat, as is its programmability, but without a Managed wrappers (COM? cough… we’re about to enter the 10’s… cough ;) the bar is pretty high for most of us. Projects like this one will come in very handy in the coming years.

8 comments:

Praveen said...

I just wanted to say thanks. You always seem to find good items for your blog post.

Joey Robichaud said...

I felt inspired by the previous commenter to post. I've ended up on your site a few times and wanted to give you kudos.
I've visited a friend that attends Eternity Bible College out in Simi a few times and think you live in one of the most beautiful places in America.
Keep up the good work!

Greg said...

Thanks guys... It's hard to express how much comments like yours helps motivate me, or any blogger.

Thanks again. :)

Oran Dennison said...

Looks like there may be another Windows 7 .NET API wrapper appearing shortly that may be more complete than this one.

http://blogs.microsoft.co.il/blogs/sasha/archive/2009/01/22/hello-windows-7-my-old-friend.aspx

Judah Himango said...

In past versions of Windows, managed add-ins for Explorer would be a bad idea: .NET 2.0 add-in would work, but whenever a .NET 1.1 app used explorer, such as using an OpenFileDialog, .NET 2 CLR tried to be loaded in the .NET 1.1 process, thus causing it to fail.

Do we still have to be worried about this? I've heard .NET 4 allows multiple CLRs loaded per process, but otherwise is this still an issue?

Greg said...

@Judah
That's a great question.

Based on PDC08, Win7 will ship with .Net 3.5 SP1. It will not have .Net 4 baked in (due to conflicting time lines, so I was told)

So if the TaskBar in Win7 is "like" the Shell Extensions in Vista and earlier then yeah, I think we could have the same CLR versioning issue...

In any case, it's sure something to keep our eyes open for.

Thanks for bringing it up.

Huseyin Tufekcilerli said...

@Judah
Yes, loading Managed Shell Extensions to Windows Explorer process (aka explorer.exe) is considered harmful and not supported by Micrsoft because of the reason you have mentioned. As Greg also said, version 4.0 of .NET Framework will enable both CLR versions 2.0 and 4.0 to be hosted in the same process. This will greatly help to solve this problem (if we are not considering versions 1.0/1.1)

But this is not an issue for my project, because you are not hosting any managed code in explorer.exe, you are just doing COM interop and P/Invoke calls in your application's own managed process.

Anonymous said...

the problem with the win 7 taskbar is it never goes away as it did with vista or xp or any version prior to 7.

If you 'hide' it, it comes back if your cursor is low enough and that's a problem when using apps with buttons at the bottom of the screen (Flash, for example).

Keep always visible and the stupid Win logo button overlays onto the application above.

An OS should never be visibile, imo. Just run the apps I want and be out of town the rest of the time.