How To Make a WM 6.5 Widget
|Ok, so this morning we released 50 widgets so let’s talk for a minute about how to make your own custom widgets. I’m going to start with the widgets that we provided. As I said, these are amongst the easiest widgets to produce and I mean that. I don’t know a thing about code and you don’t have to either. Here’s what you need to do:
1) Take any widget from the widget package and change the extension to zip and unzip its contents. Inside you’ll see three files: config.xml, widget.htm and icon.png.
2) Take config.xml and open it using Notepad. All you need to do now is change the lines to suit your needs.
3) Take widget.htm and open it using Notepad and change the lines there are well. Obviously, pick the site you want to direct it to carefully – if you want 36 hour weather to be the default then start at that page (like I did:))
4) Take the picture you want to use as your icon and it should be named icon.png (and obviously in png format) and should be in a size ranging from 64×64 and 100×100 (if it gets much larger the widget grows too large and there’s no advantage to that size; it will also lead to instability of your programs directory as we found out:))
5) Take those three files and zip them and rename the .zip extension to .wgt
And there you have it, you made a widget! See, I told you it was easy:) This code came from hrhnick who followed the Windows Mobile Team Blog.
Now I keep saying that these are simple widgets and that’s accurate. If you unzip the preinstalled WM 6.5 widgets or even the widget created by themuzz (his streaming widget) you’ll see that he has the same xml, htm and png files except he also has javascript. This is obviously a more advanced widget and this is where developers come in. There’s a Windows Mobile Developers Center guide to creating widgets and the standardizations are found here as well. I’m sure in no time we’ll have a ton of the ‘simple’ widgets which I still think are pretty useful but hopefully some more refined widgets can also be developed. Anyone want to do it? I hope so:)
And we know that some people are asking for a small change to the ‘simple‘ widgets- the ability to zoom in. And we hope to have a solution shortly. Of course, if anyone wants to share the answer now (hint WMDev Team we know you’re watching:) please do. We’ll obviously share our findings as soon as we have positive results.