How To Write A Widget

Table of contents:

How To Write A Widget
How To Write A Widget

Video: How To Write A Widget

Video: How To Write A Widget
Video: WordPress Widgets Tutorial 2024, May
Anonim

Widgets, like a gadget, are applications that display information. Usually this information is requested from a certain resource (weather forecast, time of a particular city, exchange rate, etc.). By default, widgets are displayed on the right side of the desktop screen.

How to write a widget
How to write a widget

It is necessary

Operating system series Windows Vista and above

Instructions

Step 1

The simplest widget model consists of 2 files: html and xml. Before creating the widget, you need to prepare a special folder, in other words, you need to create a new folder in which the files of your homemade applications will be located. Pay attention to the location of the final directory, it should be located in the system folder - user_folder_AppDataLocalMicrosoftWindows SidebarGadgets.

Step 2

After that, you need to create an XML format file - it will contain all the configuration information for the widget you are creating. For example, an image describing the application (general icon), information about the developer, copyright, etc.

Step 3

The file must be saved in utf-8 in order for its contents to be displayed on the desktops of most users. It will include several operands: name, version, etc. In the block, the developer indicates his real name or alias, which can be viewed in the properties of the gadget or its description.

Step 4

The block indicates the version of the created application. Your product can have several versions, the user can choose one or another version of the widget at his discretion.

Step 5

In the block, you must specify the oldest operating system of the Windows series, which will be compatible with this application. The block usually contains more detailed information about the developer.

Step 6

The block contains an icon that is displayed opposite the name of the author or developer. Licensing rights are usually placed in a block.

Step 7

Then create an HTML file in the XML file folder. Place the program code inside and save the result. Now the widget can be tried to run on a running system.

Recommended: