| Jonathan 的个人资料Jon's Vista Gadgets Blog日志列表 | 帮助 |
|
|
2月25日 Gadget basicsIf you're new to Gadgets, it can be a little confusing. So here's the basics to creating one:
1. Create a folder for your Gadget in "C:\Users\<username>\AppData\Local\Microsoft\Windows Sidebar\Gadgets". This can be called whatever you like, but it must end with ".gadget" otherwise your Gadget won't appear in the Sidebar Gallery.
eg. "myTestGadget.gadget"
2. Within your newly created folder create a gadget.xml file. This contains information such as the name, icon and description of your Gadget, I've highlighted in Blue the only sections you need be concerned with at the moment.
3. Create a gadget.html file. This contains the main Gadget HTML page
If you now go to the Gadget Gallery, you should see your Gadget. If you add it, you should get a white box with "Hello world" in it. Simple as that. From here on it gets more complicated. In future articles I'll go into detail on the gadget.xml file, settings pages and flyouts. Not to mention how to overlay transparent text/images and various bugs you're going to come across along the way. |
|
|