How to write a widget

How to write a widget

Widgets, as well as the gadget, represent the applications serving for display of any information. Usually this information is requested from a certain resource (weather forecast, time of the specific city, exchange rate , etc.). By default widgets are displayed in the right part of the screen of a desktop.

It is required to you

  • Operating system of the Windows Vista series above.

Instruction

1. The simplest model of a widget consists of 2 files: html and xml. Before creation of a widget it is necessary to prepare the special folder, in other words it is necessary to create the new folder in which there will be files of your self-made applications. Pay attention to arrangement of a final directory, it should be in a system folder - папка_пользователя_AppDataLocalMicrosoftWindows SidebarGadgets.

2. After that you need to create the file of the XML format — it will contain all information on a configuration of the widget created by you. For example, the image characterizing the application (general icon), information on the developer, copyright, etc.

3. The file needs to be saved in utf-8 that its contents was displayed on desktops of most of users. Will be its part several operand: name, version, etc. In the <name> block the developer enters the real name or an alias which can be browsed in properties of the gadget or its description.

4. The version of the created application is specified in the <version> block. At your product several versions can, the user can select any given edition of a widget on the discretion.

5. It is necessary to specify the most senior operating system of the Windows series which will be compatible to this application in the <platform> block. Usually specify more detailed information on the developer in the <info> block.

6. The <logo> block contains an icon which is displayed opposite to a name of the author or the developer. License rights, as a rule, place in the <Copyright> block.

7. Then create the file of the HTML format in the folder with the file of the XML format. Inside arrange a program code and save the result. Now the widget can try to be started on the working system.

Author: «MirrorInfo» Dream Team


Print