1. bir klasör olusturalım!!! (gizli klasörleri göster seçenegi açık olmalı)
c:/kullanıcılar/<sizin adınız>/AppData/Local/Microsoft/Windows Sidebar/Gadgets/
bu klasörün içinde deneme.gadget isimli bi klasör olusturalım...
2.bir html dosyası olusturalım deneme.html bu dosya gadgetın görünen kısmını olusturuyor...
HTML Kodu:
Kod: Tümünü seç
<html>
<head>
<title>Denemedir Bu PCnet için özel!!!</title>
<style>
body
{
margin: 0;
width: 130px;
height: 65px;
}
#gadgetContent
{
width: 130px;
top: 24px;
text-align: center;
font-family: Tahoma;
font-size: 10pt;
position: absolute;
}
#background
{
width: 130px;
height: 65px;
position: absolute;
z-index: -1;
background-repeat: no-repeat;
}
</style>
</head>
<body>
<span
id="gadgetContent"
style="font-family: Tahoma; font-size: 10pt;">
Denemedir Bu PCnet için özel!!!
</span>
</body>
</html>
Kod: Tümünü seç
<?xml version="1.0" encoding="utf-8" ?>
<gadget>
<name>Deneme Gadget</name>
<namespace>deneme</namespace>
<version>1.0.0.0</version>
<author name="Elzem">
<info url="www.pcnet.com.tr" />
</author>
<copyright>© 2006</copyright>
<description>bu gadget deneme ama süper</description>
<hosts>
<host name="sidebar">
<base type="HTML" apiVersion="1.0.0" src="deneme.html" />
<permissions>Full</permissions>
<platform minPlatformVersion="1.0" />
</host>
</hosts>
</gadget>
HTML Kodu:
Kod: Tümünü seç
<html>
<head>
<style>
body
{
width: 250px;
height: 75px;
font-family: Tahoma;
font-size: 10px;
}
</style>
<script>
System.Gadget.onSettingsClosing = settingsClosing;
function loadSettings()
{
var currentSetting = System.Gadget.Settings.read("variableName");
if (currentSetting != "")
{
envVar.innerText = currentSetting;
}
}
function settingsClosing(event)
{
if (event.closeAction == event.Action.commit)
{
variableName = envVar.value;
System.Gadget.Settings.write("variableName", variableName);
}
}
</script>
</head>
<body onload="loadSettings()">
<label for="deneme">Deneme Ayarlar:</label><br />
<input type="text" name="deneme" id="deneme" length="40" />
</body>
</html>
ALINTIDIR