Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Gets the gadget version as specified in the gadget manifest file.
This property is read-only.
Syntax
propVal = System.Gadget.version()
Parameters
- strVersion [out]
Retrieves the version of the gadget.
Remarks
A gadget must have a version specified in the gadget manifest file in order to be displayed in the Gadget Picker.
Possible uses include checking if a newer version of a gadget is available or displaying warnings of possible conflicts with other versions of the same gadget.
Examples
The following example demonstrates how to get the version of a gadget from the gadget manifest.
// The gadget manifest.
<gadget>
<name>SDK Docked</name>
<version>1.0.0.0</version>
...
</gadget>
// The gadget HTML file with inline script.
<html>
<head>
<script>
var mytext = "Gadget Version: " + System.Gadget.version;
function setContentText()
{
gadgetContent.innerText = mytext;
}
</script>
</head>
<body onload="setContentText()">
<span id="gadgetContent" style="font-family: Verdana; font-size: 20px;"/>
</body>
</html>
Requirements
| Minimum supported client | Windows Vista |
| Minimum supported server | Windows Server 2008 |
| IDL | Sidebar.idl |
| DLL | Sidebar.Exe version 1.00 or later |
See Also
Send comments about this topic to Microsoft
Build date: 2/24/2010
Build type: SDK