<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>Damir's Corner - Development|Gadgets</title>
    <link>http://www.damirscorner.com/</link>
    <description>Notes from Daily Encounters with Technology</description>
    <language>en-us</language>
    <copyright>Damir Arh, M. Sc.</copyright>
    <lastBuildDate>Mon, 11 Dec 2006 11:58:18 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.3.9074.18820</generator>
    <managingEditor>damir.arh@gmail.com</managingEditor>
    <webMaster>damir.arh@gmail.com</webMaster>
    <item>
      <trackback:ping>http://www.damirscorner.com/Trackback.aspx?guid=71bb1ef1-51ce-444d-abe5-2eed6cd7b730</trackback:ping>
      <pingback:server>http://www.damirscorner.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.damirscorner.com/PermaLink,guid,71bb1ef1-51ce-444d-abe5-2eed6cd7b730.aspx</pingback:target>
      <dc:creator>Damir Arh</dc:creator>
      <wfw:comment>http://www.damirscorner.com/CommentView,guid,71bb1ef1-51ce-444d-abe5-2eed6cd7b730.aspx</wfw:comment>
      <wfw:commentRss>http://www.damirscorner.com/SyndicationService.asmx/GetEntryCommentsRss?guid=71bb1ef1-51ce-444d-abe5-2eed6cd7b730</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I you haven't checked out <a href="http://vista.gama-system.com">our Vista site</a> recently,
now is the right time to do it. Since my last posting two new gadgets have been released:
</p>
        <ul>
          <li>
Slovenian Portfolio provides information from <a href="http://www.ljse.si">Ljubljana
Stock Exchange</a> and gives you the ability to track your personal portfolio. 
</li>
          <li>
Slovenian Rates provides information on exchange rates from 4 Slovenian banks: <a href="http://www.bsi.si">Bank
of Slovenia</a>, <a href="http://www.nlb.si">NLB</a>, <a href="http://www.skb.si">SKB</a> and <a href="http://www.nkbm.si">NKBM</a>.</li>
        </ul>
        <div>An update for Slovenian Radio has also been released in the meantime. Apart from
bug fixes the list of radio stations has been extended.
</div>
        <div> 
</div>
        <div>Try them out if you're using Windows Vista and haven't done so already.
</div>
        <img width="0" height="0" src="http://www.damirscorner.com/aggbug.ashx?id=71bb1ef1-51ce-444d-abe5-2eed6cd7b730" />
      </body>
      <title>More Sidebar Gadgets available</title>
      <guid isPermaLink="false">http://www.damirscorner.com/PermaLink,guid,71bb1ef1-51ce-444d-abe5-2eed6cd7b730.aspx</guid>
      <link>http://www.damirscorner.com/MoreSidebarGadgetsAvailable.aspx</link>
      <pubDate>Mon, 11 Dec 2006 11:58:18 GMT</pubDate>
      <description>&lt;p&gt;
I you haven't checked out &lt;a href="http://vista.gama-system.com"&gt;our Vista site&lt;/a&gt; recently,
now is the right time to do it. Since my last posting two new gadgets have been released:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Slovenian Portfolio provides information from &lt;a href="http://www.ljse.si"&gt;Ljubljana
Stock Exchange&lt;/a&gt; and gives you the ability to track your personal portfolio. 
&lt;/li&gt;
&lt;li&gt;
Slovenian Rates provides information on exchange rates from 4 Slovenian banks: &lt;a href="http://www.bsi.si"&gt;Bank
of Slovenia&lt;/a&gt;, &lt;a href="http://www.nlb.si"&gt;NLB&lt;/a&gt;,&amp;nbsp;&lt;a href="http://www.skb.si"&gt;SKB&lt;/a&gt; and &lt;a href="http://www.nkbm.si"&gt;NKBM&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;An update for Slovenian Radio has also been released in the meantime. Apart from
bug fixes the list of radio stations has been extended.
&lt;/div&gt;
&lt;div&gt;&amp;nbsp;
&lt;/div&gt;
&lt;div&gt;Try them out if you're using Windows Vista and&amp;nbsp;haven't done so already.
&lt;/div&gt;
&lt;img width="0" height="0" src="http://www.damirscorner.com/aggbug.ashx?id=71bb1ef1-51ce-444d-abe5-2eed6cd7b730" /&gt;</description>
      <comments>http://www.damirscorner.com/CommentView,guid,71bb1ef1-51ce-444d-abe5-2eed6cd7b730.aspx</comments>
      <category>Development</category>
      <category>Personal</category>
      <category>Personal/Work</category>
      <category>Development/Gadgets</category>
    </item>
    <item>
      <trackback:ping>http://www.damirscorner.com/Trackback.aspx?guid=a512ea30-7986-47f1-9d83-783a7d25d59b</trackback:ping>
      <pingback:server>http://www.damirscorner.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.damirscorner.com/PermaLink,guid,a512ea30-7986-47f1-9d83-783a7d25d59b.aspx</pingback:target>
      <dc:creator>Damir Arh</dc:creator>
      <wfw:comment>http://www.damirscorner.com/CommentView,guid,a512ea30-7986-47f1-9d83-783a7d25d59b.aspx</wfw:comment>
      <wfw:commentRss>http://www.damirscorner.com/SyndicationService.asmx/GetEntryCommentsRss?guid=a512ea30-7986-47f1-9d83-783a7d25d59b</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <a href="http://www.gama-system.com">
            <img alt="" src="http://www.damirscorner.com/content/binary/SlovenskiRadio.jpg" align="right" border="0" hspace="0" />We</a> have
just released our first <a href="http://www.microsoft.com/windowsvista/features/foreveryone/sidebar.mspx">Sidebar
Gadget</a> – Slovenian Radio. 
</p>
        <p>
The gadget features a centralized list of radio stations (retrieved from our server)
and basic controls for selecting the station and adjusting the volume. Everything
is packaged in a nice and simple GUI.
</p>
        <p>
Try it out. It really is the most convenient way of listening to Slovenian radio stations
online. You can download it for free <a href="http://vista.gama-system.com">here</a>.
Spread the word if you like it.
</p>
        <img width="0" height="0" src="http://www.damirscorner.com/aggbug.ashx?id=a512ea30-7986-47f1-9d83-783a7d25d59b" />
      </body>
      <title>Our first Sidebar Gadget released</title>
      <guid isPermaLink="false">http://www.damirscorner.com/PermaLink,guid,a512ea30-7986-47f1-9d83-783a7d25d59b.aspx</guid>
      <link>http://www.damirscorner.com/OurFirstSidebarGadgetReleased.aspx</link>
      <pubDate>Fri, 01 Dec 2006 07:23:14 GMT</pubDate>
      <description>&lt;p&gt;
&lt;a href="http://www.gama-system.com"&gt;&lt;img alt="" src="http://www.damirscorner.com/content/binary/SlovenskiRadio.jpg" align="right" border="0" hspace="0"&gt;We&lt;/a&gt; have
just released our first &lt;a href="http://www.microsoft.com/windowsvista/features/foreveryone/sidebar.mspx"&gt;Sidebar
Gadget&lt;/a&gt; – Slovenian Radio. 
&lt;/p&gt;
&lt;p&gt;
The gadget features a centralized list of radio stations (retrieved from our server)
and basic controls for selecting the station and adjusting the volume.&amp;nbsp;Everything
is&amp;nbsp;packaged in a nice and simple GUI.
&lt;/p&gt;
&lt;p&gt;
Try it out. It really is the most convenient way of listening to Slovenian radio stations
online. You can download it for free &lt;a href="http://vista.gama-system.com"&gt;here&lt;/a&gt;.
Spread the word if you like it.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.damirscorner.com/aggbug.ashx?id=a512ea30-7986-47f1-9d83-783a7d25d59b" /&gt;</description>
      <comments>http://www.damirscorner.com/CommentView,guid,a512ea30-7986-47f1-9d83-783a7d25d59b.aspx</comments>
      <category>Development</category>
      <category>Development/Gadgets</category>
      <category>Personal</category>
      <category>Personal/Work</category>
    </item>
    <item>
      <trackback:ping>http://www.damirscorner.com/Trackback.aspx?guid=de4dfc63-33be-423b-8575-1772bd2a52fa</trackback:ping>
      <pingback:server>http://www.damirscorner.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.damirscorner.com/PermaLink,guid,de4dfc63-33be-423b-8575-1772bd2a52fa.aspx</pingback:target>
      <dc:creator>Damir Arh</dc:creator>
      <wfw:comment>http://www.damirscorner.com/CommentView,guid,de4dfc63-33be-423b-8575-1772bd2a52fa.aspx</wfw:comment>
      <wfw:commentRss>http://www.damirscorner.com/SyndicationService.asmx/GetEntryCommentsRss?guid=de4dfc63-33be-423b-8575-1772bd2a52fa</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Since gadgets are HTML applications and the Windows Sidebar uses Internet Explorer
7 to render them, I prefer running their code directly in IE7 during development.
It makes debugging easier and allows me to develop them in Windows XP on my primary
development machine with all the tools properly setup.
</p>
        <p>
While this works great in early development stages, it becomes a problem later on
when you start using the Windows Sidebar object model (to implement settings,
visibility changes handlers etc.). This specific code understandably can only be debugged
while running in Windows Sidebar but the unfortunate side effect is that the calls
to objects which don’t exist in IE7 break the scripts and effectively prevent running
the would-be gadget in IE7 even without this functionality.
</p>
        <p>
The following function can help you keep the gadget running directly in IE7 even after
the gadget specific functionalities are already implemented:
</p>
        <p>
          <font face="Courier New">function isGadget()<br />
{<br />
    try<br />
    {<br />
        var dummy = System;<br />
        return true;<br />
    }<br />
    catch (err)<br />
    {<br />
        return false;<br />
    }<br />
}</font>
        </p>
        <p>
Just check if the application is running in Windows Sidebar at gadget startup and
make sure to use the object model only when this is true. You can also add alternative
initialization for running directly in IE7 to provide default values for settings
and any other gadget specific variables. By doing this you can still test new features
directly in IE7 if they are not gadget specific.
</p>
        <img width="0" height="0" src="http://www.damirscorner.com/aggbug.ashx?id=de4dfc63-33be-423b-8575-1772bd2a52fa" />
      </body>
      <title>Running Windows Sidebar gadgets directly in IE7</title>
      <guid isPermaLink="false">http://www.damirscorner.com/PermaLink,guid,de4dfc63-33be-423b-8575-1772bd2a52fa.aspx</guid>
      <link>http://www.damirscorner.com/RunningWindowsSidebarGadgetsDirectlyInIE7.aspx</link>
      <pubDate>Sun, 29 Oct 2006 13:11:59 GMT</pubDate>
      <description>&lt;p&gt;
Since gadgets are HTML applications and the Windows Sidebar uses Internet Explorer
7 to render them, I prefer running their code directly in IE7 during development.
It makes debugging easier and allows me to develop them in Windows XP on my primary
development machine with all the tools properly setup.
&lt;/p&gt;
&lt;p&gt;
While this works great in early development stages, it becomes a problem later on
when&amp;nbsp;you start using the Windows Sidebar object model (to implement settings,
visibility changes handlers etc.). This specific code understandably can only be debugged
while running in Windows Sidebar but the unfortunate side effect is that the calls
to objects which don’t exist in IE7 break the scripts and effectively prevent running
the would-be gadget in IE7 even without this functionality.
&lt;/p&gt;
&lt;p&gt;
The following function can help you keep the gadget running directly in IE7 even after
the gadget specific functionalities are already implemented:
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;function isGadget()&lt;br&gt;
{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; try&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var dummy = System;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return true;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; catch (err)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return false;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;
}&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
Just check if the application is running in Windows Sidebar at gadget startup and
make sure to use the object model only when this is true. You can also add alternative
initialization for running directly in IE7 to provide default values for settings
and any other gadget specific variables. By doing this you can still test new features
directly in IE7 if they are not gadget specific.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.damirscorner.com/aggbug.ashx?id=de4dfc63-33be-423b-8575-1772bd2a52fa" /&gt;</description>
      <comments>http://www.damirscorner.com/CommentView,guid,de4dfc63-33be-423b-8575-1772bd2a52fa.aspx</comments>
      <category>Development</category>
      <category>Development/Gadgets</category>
    </item>
    <item>
      <trackback:ping>http://www.damirscorner.com/Trackback.aspx?guid=eedd5e47-c766-43e5-a377-2882735975ed</trackback:ping>
      <pingback:server>http://www.damirscorner.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.damirscorner.com/PermaLink,guid,eedd5e47-c766-43e5-a377-2882735975ed.aspx</pingback:target>
      <dc:creator>Damir Arh</dc:creator>
      <wfw:comment>http://www.damirscorner.com/CommentView,guid,eedd5e47-c766-43e5-a377-2882735975ed.aspx</wfw:comment>
      <wfw:commentRss>http://www.damirscorner.com/SyndicationService.asmx/GetEntryCommentsRss?guid=eedd5e47-c766-43e5-a377-2882735975ed</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
The <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sidebar/sidebar/overviews/gdo.asp">whitepaper</a> sample
code doesn’t exactly follow the guidelines for web development therefore I wrote my
own sample with clearly separated HTML structure, CSS styles and JavaScript code.
I decided to make it publicly available in case anyone else finds it useful. A few
things are worth mentioning.
</p>
        <ul>
          <li>
            <strong>Empty XHTML tags.</strong> For some reason the XHTML style empty tags don’t
work as expected when they are filled from JavaScript code. It seems as if the engine
would parse them as opened tags without the corresponding closing tag. Therefore you
should always use the long form <font face="Courier New">&lt;span id=”mySpan”&gt;&lt;/span&gt;</font> instead
of the short one <font face="Courier New">&lt;span id=”mySpan” /&gt;</font>. This
problem seems to be specific for gadgets. The same code runs just fine in IE7. 
</li>
          <li>
            <strong>Localization.</strong> I haven’t managed to get the localization to work at
all. I suppose the engine uses the files from the locale directory corresponding to
the current display language not the locale settings. This does make sense but with
only English language available in Vista there’s no way to check that the current
file organization in my sample gadget is really ok. I kept it in the sample since
I’m pretty convinced that it is. 
</li>
          <li>
            <strong>Deployment.</strong> If you double click a file with a <font face="Courier New">.gadget</font> extension
in Vista, you will automatically start the gadget installation process. The file needs
to be a <font face="Courier New">zip</font> or <font face="Courier New">cab</font> archive
containing the actual gadget directory structure. Vista behaves as if an application
setup was started. This means that you should sign the file to increase the end user
trust. You can use the <a href="http://msdn2.microsoft.com/en-us/library/8s9b9yaz.aspx">Sign
Tool</a> to do that but in this case you need to make a <font face="Courier New">cab</font> file
since <font face="Courier New">zip</font> files can’t be signed with it. I tried to
make the <font face="Courier New">cab</font> file using a <font face="Courier New">CAB
Project</font> template in Visual Studio 2005 but I couldn’t make the correct directory
structure. I ended up using <a href="http://technet2.microsoft.com/WindowsServer/en/library/9d155fec-4e83-45f8-b268-823a18e386f41033.mspx?mfr=true">Cabarc</a>.
After all, I only had to run the following line in the gadget directory to build the <font face="Courier New">cab</font> file
correctly.<br /><font face="Courier New">cabarc –p –r N ..\HelloWorld.gadget *</font></li>
        </ul>
        <img width="0" height="0" src="http://www.damirscorner.com/aggbug.ashx?id=eedd5e47-c766-43e5-a377-2882735975ed" />
      </body>
      <title>A sample Windows Sidebar gadget</title>
      <guid isPermaLink="false">http://www.damirscorner.com/PermaLink,guid,eedd5e47-c766-43e5-a377-2882735975ed.aspx</guid>
      <link>http://www.damirscorner.com/ASampleWindowsSidebarGadget.aspx</link>
      <pubDate>Sun, 22 Oct 2006 12:14:03 GMT</pubDate>
      <description>&lt;p&gt;
The &lt;a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sidebar/sidebar/overviews/gdo.asp"&gt;whitepaper&lt;/a&gt; sample
code doesn’t exactly follow the guidelines for web development therefore I wrote my
own sample with clearly separated HTML structure, CSS styles and JavaScript code.
I decided to make it publicly available in case anyone else finds it useful. A few
things are worth mentioning.
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Empty XHTML tags.&lt;/strong&gt; For some reason the XHTML style empty tags don’t
work as expected when they are filled from JavaScript code. It seems as if the engine
would parse them as opened tags without the corresponding closing tag. Therefore you
should always use the long form &lt;font face="Courier New"&gt;&amp;lt;span id=”mySpan”&amp;gt;&amp;lt;/span&amp;gt;&lt;/font&gt; instead
of the short one &lt;font face="Courier New"&gt;&amp;lt;span id=”mySpan” /&amp;gt;&lt;/font&gt;. This
problem seems to be specific for gadgets. The same code runs just fine in IE7. 
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Localization.&lt;/strong&gt; I haven’t managed to get the localization to work at
all. I suppose the engine uses the files from the locale directory corresponding to
the current display language not the locale settings. This does make sense but with
only English language available in Vista there’s no way to check that the current
file organization in my sample gadget is really ok. I kept it in the sample since
I’m pretty convinced that it is. 
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deployment.&lt;/strong&gt; If you double click a file with a &lt;font face="Courier New"&gt;.gadget&lt;/font&gt; extension
in Vista, you will automatically start the gadget installation process. The file needs
to be a &lt;font face="Courier New"&gt;zip&lt;/font&gt; or &lt;font face="Courier New"&gt;cab&lt;/font&gt; archive
containing the actual gadget directory structure. Vista behaves as if an application
setup was started. This means that you should sign the file to increase the end user
trust. You can use the &lt;a href="http://msdn2.microsoft.com/en-us/library/8s9b9yaz.aspx"&gt;Sign
Tool&lt;/a&gt; to do that but in this case you need to make a &lt;font face="Courier New"&gt;cab&lt;/font&gt; file
since &lt;font face="Courier New"&gt;zip&lt;/font&gt; files can’t be signed with it. I tried to
make the &lt;font face="Courier New"&gt;cab&lt;/font&gt; file using a &lt;font face="Courier New"&gt;CAB
Project&lt;/font&gt; template in Visual Studio 2005 but I couldn’t make the correct directory
structure. I ended up using &lt;a href="http://technet2.microsoft.com/WindowsServer/en/library/9d155fec-4e83-45f8-b268-823a18e386f41033.mspx?mfr=true"&gt;Cabarc&lt;/a&gt;.
After all, I only had to run the following line in the gadget directory to build the &lt;font face="Courier New"&gt;cab&lt;/font&gt; file
correctly.&lt;br&gt;
&lt;font face="Courier New"&gt;cabarc –p –r N ..\HelloWorld.gadget *&lt;/font&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;img width="0" height="0" src="http://www.damirscorner.com/aggbug.ashx?id=eedd5e47-c766-43e5-a377-2882735975ed" /&gt;</description>
      <comments>http://www.damirscorner.com/CommentView,guid,eedd5e47-c766-43e5-a377-2882735975ed.aspx</comments>
      <category>Development</category>
      <category>Development/Gadgets</category>
      <category>Downloads</category>
      <category>Downloads/Sources</category>
      <category>Downloads/Windows</category>
      <enclosure url="http://www.damirscorner.com/content/binary/eedd5e47-c766-43e5-a377-2882735975ed/HelloWorld.zip" type="application/x-zip-compressed" length="4086" />
    </item>
    <item>
      <trackback:ping>http://www.damirscorner.com/Trackback.aspx?guid=e0426dd3-b4ae-45e6-93d2-68805c2e5e57</trackback:ping>
      <pingback:server>http://www.damirscorner.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.damirscorner.com/PermaLink,guid,e0426dd3-b4ae-45e6-93d2-68805c2e5e57.aspx</pingback:target>
      <dc:creator>Damir Arh</dc:creator>
      <wfw:comment>http://www.damirscorner.com/CommentView,guid,e0426dd3-b4ae-45e6-93d2-68805c2e5e57.aspx</wfw:comment>
      <wfw:commentRss>http://www.damirscorner.com/SyndicationService.asmx/GetEntryCommentsRss?guid=e0426dd3-b4ae-45e6-93d2-68805c2e5e57</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sidebar/sidebar/overviews/gdo.asp">This
whitepaper</a> should definitely be your first source of information when starting
with gadget development. Unfortunately I didn’t find it as helpful as it could be.
Find below a few issues that could be covered better since I’ve been struggling with
them for some time before I get everything to work as expected.
</p>
        <ul>
          <li>
The style definition for body in both pages is missing the unit – <font face="Courier New">px</font>.
Without it the definition is invalid and the gadget shows up with minimum size. The
correct style definition would be in the likes of:<br /><font face="Courier New">body 
<br />
{<br />
   width: 130px;<br />
   height: 50px;<br />
}</font></li>
          <li>
The <font face="Courier New"><a href="http://msdn.microsoft.com/library/en-us/sidebar/sidebar/reference/objects/systemgadget/settingsui.asp">settingsUI</a></font> property
is a member of <font face="Courier New"><a href="http://msdn.microsoft.com/library/en-us/sidebar/sidebar/reference/objects/systemgadget/systemgadget.asp">System.Gadget</a></font> not <font face="Courier New"><a href="http://msdn.microsoft.com/library/en-us/sidebar/sidebar/reference/objects/systemgadgetsettings/systemgadgetsettings.asp">System.Gadget.Settings</a></font>.
This time the error is in the reference not the whitepaper.</li>
          <li>
If you’re only replacing the files in the <font face="Courier New">C:\Users\&lt;username&gt;\AppData\Local\Microsoft\Windows
Sidebar\Gadgets</font> directory to update the gadget you might have some problems
with caching even if you close all gadget instances as the whitepaper suggests. In
my case the old image files and <font face="Courier New">gadget.xml</font> file were
still used although they have been replaced. Restarting Windows Sidebar should help.</li>
          <li>
Don’t forget that gadget settings are stored with a particular gadget instance. This
makes it possible to display two instances of the gadget with different settings.
The side effect is that they get lost every time you remove the gadget from the sidebar
and put it back on. It works like that by design and if you need persistent common
settings for all instances you’ll have to use <a href="http://blogs.msdn.com/sidebar/archive/2006/09/21/765604.aspx">a
different solution</a>.</li>
        </ul>
        <img width="0" height="0" src="http://www.damirscorner.com/aggbug.ashx?id=e0426dd3-b4ae-45e6-93d2-68805c2e5e57" />
      </body>
      <title>Writing your first Windows Sidebar gadget</title>
      <guid isPermaLink="false">http://www.damirscorner.com/PermaLink,guid,e0426dd3-b4ae-45e6-93d2-68805c2e5e57.aspx</guid>
      <link>http://www.damirscorner.com/WritingYourFirstWindowsSidebarGadget.aspx</link>
      <pubDate>Sun, 22 Oct 2006 11:48:31 GMT</pubDate>
      <description>&lt;p&gt;
&lt;a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sidebar/sidebar/overviews/gdo.asp"&gt;This
whitepaper&lt;/a&gt; should definitely be your first source of information when starting
with gadget development. Unfortunately I didn’t find it as helpful as it could be.
Find below a few issues that could be covered better since I’ve been struggling with
them for some time&amp;nbsp;before I&amp;nbsp;get everything to work as expected.
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
The style definition for body in both pages is missing the unit – &lt;font face="Courier New"&gt;px&lt;/font&gt;.
Without it the definition is invalid and the gadget shows up with minimum size. The
correct style definition would be in the likes of:&lt;br&gt;
&lt;font face="Courier New"&gt;body 
&lt;br&gt;
{&lt;br&gt;
&amp;nbsp;&amp;nbsp; width: 130px;&lt;br&gt;
&amp;nbsp;&amp;nbsp; height: 50px;&lt;br&gt;
}&lt;/font&gt;
&lt;/li&gt;
&lt;li&gt;
The &lt;font face="Courier New"&gt;&lt;a href="http://msdn.microsoft.com/library/en-us/sidebar/sidebar/reference/objects/systemgadget/settingsui.asp"&gt;settingsUI&lt;/a&gt;&lt;/font&gt; property
is a member of &lt;font face="Courier New"&gt;&lt;a href="http://msdn.microsoft.com/library/en-us/sidebar/sidebar/reference/objects/systemgadget/systemgadget.asp"&gt;System.Gadget&lt;/a&gt;&lt;/font&gt; not &lt;font face="Courier New"&gt;&lt;a href="http://msdn.microsoft.com/library/en-us/sidebar/sidebar/reference/objects/systemgadgetsettings/systemgadgetsettings.asp"&gt;System.Gadget.Settings&lt;/a&gt;&lt;/font&gt;.
This time the error is in the reference not the whitepaper.&lt;/li&gt;
&lt;li&gt;
If you’re only replacing the files in the &lt;font face="Courier New"&gt;C:\Users\&amp;lt;username&amp;gt;\AppData\Local\Microsoft\Windows
Sidebar\Gadgets&lt;/font&gt; directory to update the gadget&amp;nbsp;you might have some problems
with caching even if you close all gadget instances as the whitepaper suggests. In
my case the old image files and &lt;font face="Courier New"&gt;gadget.xml&lt;/font&gt; file were
still used although they have been replaced. Restarting Windows Sidebar should help.&lt;/li&gt;
&lt;li&gt;
Don’t forget that gadget settings are stored with a particular gadget instance. This
makes it possible to display two instances of the gadget with different settings.
The side effect is that they get lost every time you remove the gadget from the sidebar
and put it back on. It works like that by design and if you need persistent common
settings for all instances you’ll have to use &lt;a href="http://blogs.msdn.com/sidebar/archive/2006/09/21/765604.aspx"&gt;a
different solution&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;img width="0" height="0" src="http://www.damirscorner.com/aggbug.ashx?id=e0426dd3-b4ae-45e6-93d2-68805c2e5e57" /&gt;</description>
      <comments>http://www.damirscorner.com/CommentView,guid,e0426dd3-b4ae-45e6-93d2-68805c2e5e57.aspx</comments>
      <category>Development</category>
      <category>Development/Gadgets</category>
    </item>
    <item>
      <trackback:ping>http://www.damirscorner.com/Trackback.aspx?guid=2aa0d88d-9ea2-4bab-aea7-4da1c1299015</trackback:ping>
      <pingback:server>http://www.damirscorner.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.damirscorner.com/PermaLink,guid,2aa0d88d-9ea2-4bab-aea7-4da1c1299015.aspx</pingback:target>
      <dc:creator>Damir Arh</dc:creator>
      <wfw:comment>http://www.damirscorner.com/CommentView,guid,2aa0d88d-9ea2-4bab-aea7-4da1c1299015.aspx</wfw:comment>
      <wfw:commentRss>http://www.damirscorner.com/SyndicationService.asmx/GetEntryCommentsRss?guid=2aa0d88d-9ea2-4bab-aea7-4da1c1299015</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I though I’d gather in one place all the useful links I found with information on
development of Windows Sidebar gadgets.
</p>
        <ul>
          <li>
            <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sidebar/sidebar/overviews/gdo.asp">Gadget
Development Overview</a> whitepaper should be you first stop. It’s a short article
explaining the basics of gadget development. 
</li>
          <li>
            <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sidebar/sidebar/reference/refs.asp">Windows
Sidebar Reference</a> is the only documentation that is currently available. It’s
not very detailed, neither always accurate but it should still serve you well. 
</li>
          <li>
            <a href="http://blogs.msdn.com/sidebar/default.aspx">Gadget Corner</a> is a blog maintained
by the Windows Sidebar team. It contains a few articles with information that can’t
be found anywhere else. 
</li>
          <li>
            <a href="http://microsoftgadgets.com/forums/10/ShowForum.aspx">Sidebar Gadgets Forum</a> is
the only forum dedicated to gadget development. On top of that the Windows Sidebar
team members have the habit of answering the posted questions.</li>
        </ul>
        <div>Last but not least, don't underestimate the gadgets that come with Windows Vista.
Since it’s all HTML, CSS and JavaScript, all the source code is available and can
be a good learning material when trying to determine how some functionality has been
achieved. You can find them in <font face="Courier New">C:\Program Files\Windows Sidebar\Gadgets</font> directory.
</div>
        <div> 
</div>
        <div>[Updated on: 29.10.2006, <a href="http://microsoftgadgets.com/forums/10/ShowForum.aspx">Sidebar
Gadgets Forum</a> link added]
</div>
        <img width="0" height="0" src="http://www.damirscorner.com/aggbug.ashx?id=2aa0d88d-9ea2-4bab-aea7-4da1c1299015" />
      </body>
      <title>Resources for Windows Sidebar gadget development</title>
      <guid isPermaLink="false">http://www.damirscorner.com/PermaLink,guid,2aa0d88d-9ea2-4bab-aea7-4da1c1299015.aspx</guid>
      <link>http://www.damirscorner.com/ResourcesForWindowsSidebarGadgetDevelopment.aspx</link>
      <pubDate>Sun, 22 Oct 2006 11:40:45 GMT</pubDate>
      <description>&lt;p&gt;
I though I’d gather in one place all the useful links I found with information on
development of Windows Sidebar gadgets.
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sidebar/sidebar/overviews/gdo.asp"&gt;Gadget
Development Overview&lt;/a&gt; whitepaper should be you first stop. It’s a short article
explaining the basics of gadget development. 
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sidebar/sidebar/reference/refs.asp"&gt;Windows
Sidebar Reference&lt;/a&gt; is the only documentation that is currently available. It’s
not very detailed, neither always accurate but it should still serve you well. 
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://blogs.msdn.com/sidebar/default.aspx"&gt;Gadget Corner&lt;/a&gt; is a blog maintained
by the Windows Sidebar team. It contains a few articles with information that can’t
be found anywhere else. 
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://microsoftgadgets.com/forums/10/ShowForum.aspx"&gt;Sidebar Gadgets Forum&lt;/a&gt; is
the only forum dedicated to gadget development. On top of that the Windows Sidebar
team members have the habit of answering the posted questions.&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;Last but not least, don't underestimate the gadgets that come with Windows Vista.
Since it’s all HTML, CSS and JavaScript, all the source code is available and can
be a good learning material when trying to determine how some functionality has been
achieved. You can find them in &lt;font face="Courier New"&gt;C:\Program Files\Windows Sidebar\Gadgets&lt;/font&gt; directory.
&lt;/div&gt;
&lt;div&gt;&amp;nbsp;
&lt;/div&gt;
&lt;div&gt;[Updated on: 29.10.2006, &lt;a href="http://microsoftgadgets.com/forums/10/ShowForum.aspx"&gt;Sidebar
Gadgets Forum&lt;/a&gt; link added]
&lt;/div&gt;
&lt;img width="0" height="0" src="http://www.damirscorner.com/aggbug.ashx?id=2aa0d88d-9ea2-4bab-aea7-4da1c1299015" /&gt;</description>
      <comments>http://www.damirscorner.com/CommentView,guid,2aa0d88d-9ea2-4bab-aea7-4da1c1299015.aspx</comments>
      <category>Development</category>
      <category>Development/Gadgets</category>
    </item>
  </channel>
</rss>