Thursday, February 24, 2011

Windows 7 Gadget Development


Windows Sidebar

A gadget is an HTML and script-based application designed to present the user with a limited set of information or functionality obtained from other applications, controls, or Web sites and services. Gadgets, although hosted by the Sidebar, are not confined to the Sidebar area; the user can undock and move them onto the desktop as desired.

A gadget is distributed as a .gadget file—a renamed .zip archive—consisting of a collection of XML, HTML, Microsoft JScript, and Cascading Style Sheets (CSS) files. Installation consists of downloading the .gadget file and allowing the download process to install the gadget or saving the .gadget file to the local system and double-clicking to start the installation process.

Users can run multiple instances of a gadget simultaneously. For example, if users want to know the time in different time zones, they can run multiple instances of the clock gadget, setting each clock to a specific time zone. A user might want to view slideshows of pictures from two or more different folders at the same time. This is possible because the gadget platform provides methods to store settings and automatically associate settings with the correct instance of each gadget. All current gadget settings are saved when the user logs out or restarts. If the Sidebar is on by default, then all gadget instances will run automatically upon startup, and each gadget instance will run with the correct settings.

Introduction to the Gadget Platform

This topic introduces the Gadget Platform for Windows 7. It discusses the evolution of the Gadget Platform from the Windows Vista Sidebar, the differences between the two platforms, and what you need to know when you transition Sidebar gadgets to the new Windows Gadget Platform.

Windows Sidebar Object Reference

The Windows Sidebar and gadget architecture consists of three components. The functionality of these components is exposed through the scripting elements described in the following sections:

  • Gadget functionality, such as Sidebar and gadget state and event handling.
  • System functionality, such as file, network, and operating system information.
  • Presentation functionality, such as gadget background, image, and text handling.

Other Links

Developing Gadgets for the Windows Sidebar -
Script# -
Authoring Sidebar Gadgets in C# (with Script#) -
Creating Windows 7 and Vista Gadgets (Book Resource Site) -

No comments: