My Screen Saver Vista Sidebar Gadget

 For some reason, I’m drawn to creating things that are just cool while not altogether useful (see my Animated Activity Designer post, though one could argue that it may in fact be useful). To that end, I decided to create a Vista Sidebar gadget that displays a screen saver of your choosing. Vista has some good screen savers that it shipped with and I’ve embedded screen savers before (in fact, I show how to do it in one of my books).

So go ahead and grab it from the Windows Live Gallery (link below). If enough people clamor and beg, I will post the source code. Here’s a quick rundown of what I did:

1. Create a .NET User Control
2. Embed a screen saver in the user control whenever the ScreenSaverPath property is set (and the control is visible)
3. Create the HTML page for the sidebar (sidebar controls use Javascript and HTML in case you didn’t know already)
4. Embed the UserControl in the HTML page (using COM interop naturally)
5. Create a settings page that also uses COM Interop. The settings page calls a .NET component that I wrote that simply returns a collection of screen saver paths on the local system.
6. Create the installation in Javascript. I had to get some help for this one. Basically, I do what regasm does by using the WSHShell object to set registry entries. I found some code on the Internet to help.

Here’s a screenshot of it in action using the Ribbons screensaver:

Here’s the link:

Screen Saver Vista Sidebar Gadget

Comments (3)

  1. heaths says:

    You could actually do this without COM interop, which would avoid having to register the coclass which may require admin privileges, depending on how you register it (not to mention basic setup woes). Read a very old piece I did at

  2. Ok this is an old post. But who knows, maybe I can find an answer here.

    I look to the exact opposite of your widget. I’m in a desperate search of a screensaver that will display useful gadgets. 🙂

    Is that possible ?