Windows 7 desktop gadget

Recently I have been writing my own windows 7 widget. Here you can have a look on what it does, download it or find some links to guides how to create one ;)

  • What is it?

Desktop widgets (commonly just called widgets) are interactive virtual tools that provide single-purpose services such as showing the user the latest news, the current weather, the time, a calendar, a dictionary, a map program, a calculator, desktop notes, photo viewers, or even a language translator, among other things.


  • How did it started and why did I do it?

Well, to have more space on a desktop for applications, I have turned the task bar auto-hide on. Since then, to see the time or a day, I had to move a pointer over the hidden task bar to display it and see the clock. And as all of you know, moving a computer mouse is extremely tiring and time consuming. I had to find other way to display a clock, which would not require from me any activity except looking at a particular place on the screen. I started looking for a desktop clocks in windows widgets. Most of widgets display analog clocks, which I don’t like too much. Although I have finally learnt how to read a time from the analog clock (I had serious problems with it for a long time :P), I still don’t like it because it requires thinking from me ^^. I didn’t find any digital clock which fully satisfied my requirements. As a temporary solution I have downloaded this one. I didn’t like the 12-hours clock and the way it displayed the time so I have changed its code a bit. Over time I have been removing components I didn’t use and adding my own features. Finally, it resulted in creating my own desktop widget using the one above as a guide and template.

  • How to create Windows 7 desktop gadget?

Desktop widgets use internet technologies like html, CSS, and JavaScript while Windows provides some libraries to connect a widget with an operating system. Have a look here for some general information and here for JavaScript API. Once you have all the files you need, archive it with zip to a file named *.gadget. Windows will know what to do with such a file ;)

  • What does this particular widget do?

It displays a day of a week, day of a month, a month and a time (24 hours clock) in the format: DDD hh:mm:ss. After clicking on it, it becomes a stopwatch. It contains two buttons which can be used to open particular directories or run certain files.

As with all widgets, it is possible to place it on a desktop wherever you want, define opacity and set it to be always on top so you will not accidentally hide it with your web-browser ;)

  • How to download, install and configure?

Files can be downloaded as a zip archive from here or just seen here.

Once you downloaded it, you have to define what the buttons will do (ok, you don’t have to, but you want them to do something, don’t you?) and there are two ways to do it:

1. Delete button1.lnk and button2.lnk files, create two new shortcuts and put them in the same directory (ensure that names are the same).

2. Open file’s properties and change a path in “target” field.

If you want to change the images, feel free to do it. Background is 220×37 pixels and buttons are 25×25. They must all be png files and may use transparency.

Finally, all you need to do is to pack the files using zip to a file with *.gadget extension (e.g. blah.gadget) and double click it.

Here you can find a movie which shows how to do all of the above and what does the widget do.

Enjoy ;)

About Jaroslaw Pawlak

I have done MSci in Computer Science at King’s College London and currently work as Software Engineer specialising in Java. I spend most of my time in front of computer improving my programming (and other) skills or just relaxing with a good game. I also train some sports but at the moment I am not a member of any club. I love cycling and volleyball, but I have also played a lot of football, tennis and trained martial arts.

Posted on June 12, 2011, in My Projects. Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: