How to Create A Vista Gadget

One of Windows Vista's most notable upgrades from previous versions is the optional Windows Sidebar. This program displays widgets that Microsoft calls "gadgets" on the right side of your desktop, and can easily run in the background. Anyone can develop a gadget for the program, and implementing it is surprisingly easy: you can get an original gadget running on your sidebar in 15 minutes.

Instructions

    • 1

      Decide what type of gadget you'd like to create. For the purposes of this guide, we'll be creating a simple to-do list based on basic HTML code. Vista gadgets also support DHTML and ASP.NET; anything you can come up with in any of these languages could become a gadget.

    • 2

      Write the code for your gadget in a text editor and save it in the desired file format. Our basic to-do list is called "MyToDo.html" and looks like this:
      <html>
      <head>
      <title>Simple To-Do List</title>
      <style>body { width:130px; height:260px; }</style>
      </head>
      <body>
      <h4>To-Do</h4>
      <textarea style="width:110px;height:200px;"></textarea>
      </body>
      </html>

    • 3

      Create another file in your text editor and save it as "Gadget.xml". This file will contain all the meta data about your gadget, such as the author and description. The basic template is below; replace everything necessary with your own information:
      <?xml version="1.0" encoding="utf-8" ?>
      <gadget>
      <name>Simple To-Do List</name>
      <namespace>Example.You</namespace>
      <version>1.0</version>
      <author name="Your Name">
      <info url="yourwebsite.com" />
      </author>
      <copyright>Current Year</copyright>
      <description>The simplest to-do list ever created.</description>
      <hosts>
      <host name="sidebar">
      <base type="HTML" apiVersion="1.0.0" src="MyToDo.html" mce_src="MyToDo.html" />
      <permissions>full</permissions>
      <platform minPlatformVersion="0.3" />
      </host>
      </hosts>
      </gadget>

    • 4

      Navigate to your Vista user account folder, then select the "AppData" folder, then "Local," then "Microsoft," then "Windows Sidebar," then "Gadgets." (If you can't find these folders, see Tips below.) Inside this folder, create a new folder called "MyToDo.Gadget". Place the MyToDo.html and Gadget.xml files inside this folder.

    • 5

      Open the Windows Sidebar and press the "+" button on top to open a window full of available gadgets. "Simple To-Do List" should now be one of them. Double-click on it to place it in your sidebar. See the accompanying picture for what our gadget looks like in action.

Tips & Warnings

  • If you can't find the folders you need in Step 4, press "Alt" when any Vista window is open. In the top menu that appears, select "Tools," then "Folder Options," then "View," and finally "Show hidden files and folders."

Related Searches:

References

Comments

You May Also Like

Related Ads

Featured