0

I want to create a deskband app, like BatteryBar, in C#. I understand that the deskband might not work in future versions of windows, that you shouldn't code explorer extensions in managed code, and whatnot. My question is, what is the current reccomended way to create a deskband (or a simulation of one) in C#? Thanks in advance!

MatthewSot
  • 3,516
  • 5
  • 39
  • 58
  • @Ramhound, i saw those, but they pretty much explained how to fix certain problems with IDeskBand on Windows 7, etc. I don't know where to start (except for IDeskBand 2). – MatthewSot Apr 22 '11 at 19:00

1 Answers1

3

This may not answer your question, but it is important information related to your question:

You said,

I understand ... that you shouldn't code explorer extensions in managed code

This is no longer true.

This used to be true because the multiple versions of the CLR could not be loaded into a single process. For example, Explorer could not load an extension that used both .NET 2 and .NET 1; the host process would fail to load the second CLR version.

But with .NET 4, which comes with a new CLR, you can now run multiple versions of the CLR in the same process. So if you write your code using .NET 4, you're no longer at risk of making host processes error out.

In short, it is now OK to write Explorer extensions in managed code, provided you're using .NET 4 or greater.

Judah Gabriel Himango
  • 58,906
  • 38
  • 158
  • 212
  • Thanks! Any idea how to create the explorer extension? – MatthewSot Apr 22 '11 at 19:00
  • This is still true, it's only slightly less bad to code Explorer extensions in managed code. Pulling all of the CLR in every time the user opens a File dialog is completely lame and your users will hate you. Now, if you want to *prototype* in C#, then later rewrite it in C++, that's not a bad idea. – Ana Betts Apr 22 '11 at 19:32
  • Paul, a deskband is a UI extension not a shell namespace extension. It does not get loaded in arbitrary process. But I agree your conclusion, it would be bad enough even when only explorer.exe suffers from slowdown. – Sheng Jiang 蒋晟 Apr 22 '11 at 20:11
  • Thanks for the info, Sheng. Paul, that's true. I kind of find it funny that you, the author of an excellent UI framework built on the CLR, is saying, "don't load the CLR into explorer.exe" :-) On a more serious point, what overhead, exactly, does loading the CLR entail? Do we have perf or memory measurements? – Judah Gabriel Himango Apr 24 '11 at 00:40