So how do you create a basic windows 7 gadget? I have begun building an html based Windows 7 gadget in order to design a touchscreen gui for Windows 7 but here are the basics of an html based gadget.
1. Create a directory and name it Simple.gadget, feel free to rename it as long as the file appears as such : *.gadget
<body style="width:200px; height:200px;">
3. Create a cool logo! something simple maybe? Here I’ll use this:
4. Create your gadget.xml folder
You’ll need 3 things here: your html file name/location, your gadgets name, and any other side information you want to add in – there is a lot you can do with this file, but this is just a simple gadget.
This folder will contain the following code:
<?xml version="1.0" encoding="utf-8" ?>
<author name="Brandon Copley">
<info url="www.brandoncopley.com" />
<copyright>© Your Name.</copyright>
<description>This is a simple gadget.</description>
<base type="HTML" apiVersion="1.0.0" src="index.html" />
<platform minPlatformVersion="1.0" />
And there you have it a simple html based Windows 7 gadget. There are two things to watch out for. NAMING CONVENTIONS!!! your gadget.xml file MUST be called gadget.xml, feel free to name index.html whatever you want – I even use .hta’s in order for the file to be able to access the windows file system – more on that later. Also your gadget name in the xml file must be the same name used as your folder name so if you want to name your gadget “cookbook” you must change the folder to cookbook.gadget also.
Installing your gadget
In order to install your gadget you must take note of 2 things.
1. As you develop your gadget you don’t have to install it, you can simply drag your simple.gadget folder over to the C:\Program Files\Windows Sidebar\Gadgets folder with all of the other gadgets.
2. When you actually go to install your gadget you must take your simple.gadget folder and compress it to a zip file.
The next step is removing the “.zip” from the folder title and then you can go ahead and double click to install the gadget.
It’s that simple.
NOTE: If you are running windows 64bit you CANNOT run flash files from your .html, why? because there is NO 64 bit version of flash yet therefore you must close out of all of your gadgets, run C:\Program Files (x86)\Windows Sidebar\sidebar.exe and then install your gadget to that Gadget folder.
So there ya go – how to create a basic html based Windows 7 gadget.
Source Files: simple.Gadget.zip