<?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>Mike Francis: My Mobile Home - Icons</title>
    <link>http://blog.mjfnet.com/Blog/</link>
    <description>focusing on mobile application development...</description>
    <image>
      <url>http://www.mjfnet.com/blog/images/mikehead.jpg</url>
      <title>Mike Francis: My Mobile Home - Icons</title>
      <link>http://blog.mjfnet.com/Blog/</link>
    </image>
    <language>en-us</language>
    <copyright>Mike Francis</copyright>
    <lastBuildDate>Fri, 06 Nov 2009 02:30:44 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.3.9074.18820</generator>
    <managingEditor>mike@mjfnet.com</managingEditor>
    <webMaster>mike@mjfnet.com</webMaster>
    <item>
      <trackback:ping>http://blog.mjfnet.com/Blog/Trackback.aspx?guid=8cf7b1a6-d3ac-41b2-b2cc-f97504dceafb</trackback:ping>
      <pingback:server>http://blog.mjfnet.com/Blog/pingback.aspx</pingback:server>
      <pingback:target>http://blog.mjfnet.com/Blog/PermaLink,guid,8cf7b1a6-d3ac-41b2-b2cc-f97504dceafb.aspx</pingback:target>
      <dc:creator>Mike Francis</dc:creator>
      <wfw:comment>http://blog.mjfnet.com/Blog/CommentView,guid,8cf7b1a6-d3ac-41b2-b2cc-f97504dceafb.aspx</wfw:comment>
      <wfw:commentRss>http://blog.mjfnet.com/Blog/SyndicationService.asmx/GetEntryCommentsRss?guid=8cf7b1a6-d3ac-41b2-b2cc-f97504dceafb</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Some developers are reporting a problem with the PNG icon not displaying in the Start
screen.The usual symptom is that it does not show up immediately after installation
but is seen after a device reset. This problem occurs if following the <a href="http://windowsteamblog.com/blogs/windowsphone/archive/2009/08/05/using-custom-icons-in-windows-mobile-6-5.aspx#StaticSetup">static
cab</a> method from the blog post: <a href="http://windowsteamblog.com/blogs/windowsphone/archive/2009/08/05/using-custom-icons-in-windows-mobile-6-5.aspx">Using
Custom Icons in Windows Mobile 6.5</a>. I can reproduce this pretty consistently by
installing again after initially installing. (During this process the first installation
is uninstalled.) The static method does not use a setup DLL, but instead uses CAB
file directives that are easily specified using Visual Studio to define the installation
destination, files to be installed, the program shortcut, and any necessary registry
keys. 
</p>
        <p>
So why is this happening?
</p>
        <p>
For the PNG file to be displayed, the following sequence must take place, the next
step dependant on the next:
</p>
        <ol>
          <li>
Copy the PNG File to the destination directory 
</li>
          <li>
Create the registry key pointing to the PNG file 
</li>
          <li>
Create the program shortcut 
</li>
        </ol>
        <p>
When the shortcut is created the shell will:
</p>
        <ol>
          <li>
Use the shortcut (.lnk) file specified in step 3 above, and look up the registry key
specified in step 2 above. The registry key needs to exist for this step to succeed. 
</li>
          <li>
Open the PNG file, based on the registry key, and cache the Start screen icon. 
</li>
          <li>
If you look at the _setup.xml that is included CAB file, you can see the order of
events: 
</li>
        </ol>
        <div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
          <div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum1"> 1:</span>
              <span style="color: #0000ff">&lt;</span>
              <span style="color: #800000">characteristic</span>
              <span style="color: #ff0000">type</span>
              <span style="color: #0000ff">="%CE11%"</span>
              <span style="color: #ff0000">translation</span>
              <span style="color: #0000ff">="install"</span>
              <span style="color: #0000ff">&gt;</span>
            </pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum2"> 2:</span>
              <span style="color: #0000ff">&lt;</span>
              <span style="color: #800000">characteristic</span>
              <span style="color: #ff0000">type</span>
              <span style="color: #0000ff">="MakeDir"</span>
              <span style="color: #0000ff">/&gt;</span>
            </pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum3"> 3:</span>
              <span style="color: #0000ff">&lt;</span>
              <span style="color: #800000">characteristic</span>
              <span style="color: #ff0000">type</span>
              <span style="color: #0000ff">="SMS
Intercept.lnk"</span>
              <span style="color: #ff0000">translation</span>
              <span style="color: #0000ff">="install"</span>
              <span style="color: #0000ff">&gt;</span>
            </pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum4"> 4:</span>
              <span style="color: #0000ff">&lt;</span>
              <span style="color: #800000">characteristic</span>
              <span style="color: #ff0000">type</span>
              <span style="color: #0000ff">="Shortcut"</span>
              <span style="color: #0000ff">&gt;</span>
            </pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum5"> 5:</span>
              <span style="color: #0000ff">&lt;</span>
              <span style="color: #800000">parm</span>
              <span style="color: #ff0000">name</span>
              <span style="color: #0000ff">="Source"</span>
              <span style="color: #ff0000">value</span>
              <span style="color: #0000ff">="%InstallDir%\sms
Intercept.exe"</span>
              <span style="color: #ff0000">translation</span>
              <span style="color: #0000ff">="install"</span>
              <span style="color: #0000ff">/&gt;</span>
            </pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum6"> 6:</span> ...</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum7"> 7:</span>
              <span style="color: #0000ff">&lt;</span>
              <span style="color: #800000">characteristic</span>
              <span style="color: #ff0000">type</span>
              <span style="color: #0000ff">="Registry"</span>
              <span style="color: #0000ff">&gt;</span>
            </pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum8"> 8:</span>
              <span style="color: #0000ff">&lt;</span>
              <span style="color: #800000">characteristic</span>
              <span style="color: #ff0000">type</span>
              <span style="color: #0000ff">="HKLM\Security\Shell\StartInfo\Start\SMS
Intercept.lnk"</span>
              <span style="color: #0000ff">&gt;</span>
            </pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum9"> 9:</span>
              <span style="color: #0000ff">&lt;</span>
              <span style="color: #800000">parm</span>
              <span style="color: #ff0000">name</span>
              <span style="color: #0000ff">="Icon"</span>
              <span style="color: #ff0000">value</span>
              <span style="color: #0000ff">="%InstallDir%\AppIcon.png"</span>
              <span style="color: #ff0000">datatype</span>
              <span style="color: #0000ff">="string"</span>
              <span style="color: #ff0000">translation</span>
              <span style="color: #0000ff">="install"</span>
              <span style="color: #0000ff">/&gt;</span>
            </pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum10"> 10:</span>
              <span style="color: #0000ff">&lt;/</span>
              <span style="color: #800000">characteristic</span>
              <span style="color: #0000ff">&gt;</span>
            </pre>
            <!--CRLF-->
          </div>
        </div>
        <p>
        </p>
        <p>
        </p>
        <p>
Note that the instructions to create the shortcut appear <em>sooner</em> in the file
than those for the creation of the registry key. In most cases, the timing is such
that despite this order, the registry key is in place by the time the shortcut cut
is actually created. If the registry key pointing to the location of the PNG file
does not exist when the shortcut is created, the PNG icon will not be created.
</p>
        <p>
Unfortunately the order of these events cannot be changed in the Visual Studio project
or by reordering the directives in the .INF file. 
</p>
        <p>
The workaround is to append the XML for the shortcut creation to the CAB file. This
will ensure that the shortcut creation is the last instruction to be processed. You
can do this by following these steps:
</p>
        <ol>
          <li>
Remove the shortcut directive from your Smart Device CAB file project in Visual Studio. 
</li>
          <li start="3">
Modify the following XML (lines 4 and 6) to match your application: 
</li>
        </ol>
        <p>
        </p>
        <p>
        </p>
        <div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
          <div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum1"> 1:</span>
              <span style="color: #0000ff">&lt;</span>
              <span style="color: #800000">characteristic</span>
              <span style="color: #ff0000">type</span>
              <span style="color: #0000ff">="FileOperation"</span>
              <span style="color: #0000ff">&gt;</span>
            </pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum2"> 2:</span>
              <span style="color: #0000ff">&lt;</span>
              <span style="color: #800000">characteristic</span>
              <span style="color: #ff0000">type</span>
              <span style="color: #0000ff">="%CE11%"</span>
              <span style="color: #ff0000">translation</span>
              <span style="color: #0000ff">="install"</span>
              <span style="color: #0000ff">&gt;</span>
            </pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum3"> 3:</span>
              <span style="color: #0000ff">&lt;</span>
              <span style="color: #800000">characteristic</span>
              <span style="color: #ff0000">type</span>
              <span style="color: #0000ff">="MakeDir"</span>
              <span style="color: #0000ff">/&gt;</span>
            </pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum4"> 4:</span>
              <span style="color: #0000ff">&lt;</span>
              <span style="color: #800000">characteristic</span>
              <span style="color: #ff0000">type</span>
              <span style="color: #0000ff">="SMS
Intercept.lnk"</span>
              <span style="color: #ff0000">translation</span>
              <span style="color: #0000ff">="install"</span>
              <span style="color: #0000ff">&gt;</span>
            </pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum5"> 5:</span>
              <span style="color: #0000ff">&lt;</span>
              <span style="color: #800000">characteristic</span>
              <span style="color: #ff0000">type</span>
              <span style="color: #0000ff">="Shortcut"</span>
              <span style="color: #0000ff">&gt;</span>
            </pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum6"> 6:</span>
              <span style="color: #0000ff">&lt;</span>
              <span style="color: #800000">parm</span>
              <span style="color: #ff0000">name</span>
              <span style="color: #0000ff">="Source"</span>
              <span style="color: #ff0000">value</span>
              <span style="color: #0000ff">="%InstallDir%\sms
Intercept.exe"</span>
              <span style="color: #ff0000">translation</span>
              <span style="color: #0000ff">="install"</span>
              <span style="color: #0000ff">/&gt;</span>
            </pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum7"> 7:</span>
              <span style="color: #0000ff">&lt;/</span>
              <span style="color: #800000">characteristic</span>
              <span style="color: #0000ff">&gt;</span>
            </pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum8"> 8:</span>
              <span style="color: #0000ff">&lt;/</span>
              <span style="color: #800000">characteristic</span>
              <span style="color: #0000ff">&gt;</span>
            </pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum9"> 9:</span>
              <span style="color: #0000ff">&lt;/</span>
              <span style="color: #800000">characteristic</span>
              <span style="color: #0000ff">&gt;</span>
            </pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum10"> 10:</span>
              <span style="color: #0000ff">&lt;/</span>
              <span style="color: #800000">characteristic</span>
              <span style="color: #0000ff">&gt;</span>
            </pre>
            <!--CRLF-->
          </div>
        </div>
        <p>
        </p>
        <p>
        </p>
        <ol>
          <li>
Save this to a file: shortcut.xml 
</li>
          <li>
Get the command line used by CABWIZ to build your CAB file. We are going to use this
to build a Post Build step. 
<ol><li>
Build your CAB file project. 
</li><li>
Open the Output window in Visual Studio and you should see something like: 
</li></ol></li>
        </ol>
        <p>
          <font size="1" face="Courier New">Building file 'C:\Projects\sms Intercept\sms Intercept\sms
Intercept\CAB Static\Static CAB\Debug\StaticCAB.cab'... </font>
        </p>
        <p>
          <font size="1" face="Courier New">"C:\Program Files\Microsoft Visual Studio 9.0\smartdevices\sdk\sdktools\cabwiz.exe" 
<br />
     "C:\Projects\sms Intercept\sms Intercept\sms Intercept\CAB
Static\Static CAB\Debug\StaticCAB.inf" 
<br />
     /dest "C:\Projects\sms Intercept\sms Intercept\sms Intercept\CAB
Static\Static CAB\Debug\" 
<br />
     /err CabWiz.log</font>
        </p>
        <ol>
          <li value="3">
Modify your Visual Studio main application project, to include a post build event.
(Project | Properties | Build Event) (Ideally we would do this as part of building
the CAB file, but Smart Device CAB projects do not include pre or post build events.) 
<ol><li>
Paste in the command line with the switch (/postxml) to add the shortcut.xml file
into the Post Build event command line: 
<p><font size="1" face="Courier New">"C:\Program Files\Microsoft Visual Studio 9.0\smartdevices\sdk\sdktools\cabwiz.exe" 
<br />
     "C:\Projects\sms Intercept\sms Intercept\sms Intercept\CAB
Static\Static CAB\Debug\StaticCAB.inf" 
<br />
     /postxml "C:\Projects\sms Intercept\sms Intercept\sms Intercept\CAB
Static\Static CAB\Shortcut.XML"<br />
     </font><font size="1" face="Courier New">/dest "C:\Projects\sms
Intercept\sms Intercept\sms Intercept\CAB Static\Static CAB\Debug\" 
<br />
     /err CabWiz.log</font></p></li></ol></li>
          <li>
Now when you build the main project, your CAB file will also be built, with instructions
in the XML in the correct order.</li>
        </ol>
        <p>
The static cab project in the PNG Start screen sample with the above implemented can
be found <a href="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/windowsphone/sms%20intercept.zip">here</a>.
</p>
        <p>
I realize this is not the cleanest solution – but it will resolve the problem of the
PNG icon sometimes not being displayed if using the static CAB deployment method.
At least, you still don’t have to write / maintain any C++ code to support the PNG
icon.
</p>
        <p>
Enjoy-
</p>
        <p>
Mike
</p>
      </body>
      <title>Windows Mobile 6.5 Start Screen PNG Icon Display problem</title>
      <guid isPermaLink="false">http://blog.mjfnet.com/Blog/PermaLink,guid,8cf7b1a6-d3ac-41b2-b2cc-f97504dceafb.aspx</guid>
      <link>http://blog.mjfnet.com/Blog/2009/11/06/WindowsMobile65StartScreenPNGIconDisplayProblem.aspx</link>
      <pubDate>Fri, 06 Nov 2009 02:30:44 GMT</pubDate>
      <description>&lt;p&gt;
Some developers are reporting a problem with the PNG icon not displaying in the Start
screen.The usual symptom is that it does not show up immediately after installation
but is seen after a device reset. This problem occurs if following the &lt;a href="http://windowsteamblog.com/blogs/windowsphone/archive/2009/08/05/using-custom-icons-in-windows-mobile-6-5.aspx#StaticSetup"&gt;static
cab&lt;/a&gt; method from the blog post: &lt;a href="http://windowsteamblog.com/blogs/windowsphone/archive/2009/08/05/using-custom-icons-in-windows-mobile-6-5.aspx"&gt;Using
Custom Icons in Windows Mobile 6.5&lt;/a&gt;. I can reproduce this pretty consistently by
installing again after initially installing. (During this process the first installation
is uninstalled.) The static method does not use a setup DLL, but instead uses CAB
file directives that are easily specified using Visual Studio to define the installation
destination, files to be installed, the program shortcut, and any necessary registry
keys. 
&lt;/p&gt;
&lt;p&gt;
So why is this happening?
&lt;/p&gt;
&lt;p&gt;
For the PNG file to be displayed, the following sequence must take place, the next
step dependant on the next:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
Copy the PNG File to the destination directory 
&lt;li&gt;
Create the registry key pointing to the PNG file 
&lt;li&gt;
Create the program shortcut 
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
When the shortcut is created the shell will:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
Use the shortcut (.lnk) file specified in step 3 above, and look up the registry key
specified in step 2 above. The registry key needs to exist for this step to succeed. 
&lt;li&gt;
Open the PNG file, based on the registry key, and cache the Start screen icon. 
&lt;li&gt;
If you look at the _setup.xml that is included CAB file, you can see the order of
events: 
&lt;/li&gt;
&lt;/ol&gt;
&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
&lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt; 1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;characteristic&lt;/span&gt; &lt;span style="color: #ff0000"&gt;type&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="%CE11%"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;translation&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="install"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt; 2:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;characteristic&lt;/span&gt; &lt;span style="color: #ff0000"&gt;type&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="MakeDir"&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt; 3:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;characteristic&lt;/span&gt; &lt;span style="color: #ff0000"&gt;type&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="SMS
Intercept.lnk"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;translation&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="install"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum4"&gt; 4:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;characteristic&lt;/span&gt; &lt;span style="color: #ff0000"&gt;type&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Shortcut"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum5"&gt; 5:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;parm&lt;/span&gt; &lt;span style="color: #ff0000"&gt;name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Source"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;value&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="%InstallDir%\sms
Intercept.exe"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;translation&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="install"&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum6"&gt; 6:&lt;/span&gt; ...&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum7"&gt; 7:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;characteristic&lt;/span&gt; &lt;span style="color: #ff0000"&gt;type&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Registry"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum8"&gt; 8:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;characteristic&lt;/span&gt; &lt;span style="color: #ff0000"&gt;type&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="HKLM\Security\Shell\StartInfo\Start\SMS
Intercept.lnk"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum9"&gt; 9:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;parm&lt;/span&gt; &lt;span style="color: #ff0000"&gt;name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Icon"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;value&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="%InstallDir%\AppIcon.png"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;datatype&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="string"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;translation&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="install"&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum10"&gt; 10:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;characteristic&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
Note that the instructions to create the shortcut appear &lt;em&gt;sooner&lt;/em&gt; in the file
than those for the creation of the registry key. In most cases, the timing is such
that despite this order, the registry key is in place by the time the shortcut cut
is actually created. If the registry key pointing to the location of the PNG file
does not exist when the shortcut is created, the PNG icon will not be created.
&lt;/p&gt;
&lt;p&gt;
Unfortunately the order of these events cannot be changed in the Visual Studio project
or by reordering the directives in the .INF file. 
&lt;/p&gt;
&lt;p&gt;
The workaround is to append the XML for the shortcut creation to the CAB file. This
will ensure that the shortcut creation is the last instruction to be processed. You
can do this by following these steps:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
Remove the shortcut directive from your Smart Device CAB file project in Visual Studio. 
&lt;li start="3"&gt;
Modify the following XML (lines 4 and 6) to match your application: 
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
&lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt; 1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;characteristic&lt;/span&gt; &lt;span style="color: #ff0000"&gt;type&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="FileOperation"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt; 2:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;characteristic&lt;/span&gt; &lt;span style="color: #ff0000"&gt;type&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="%CE11%"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;translation&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="install"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt; 3:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;characteristic&lt;/span&gt; &lt;span style="color: #ff0000"&gt;type&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="MakeDir"&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum4"&gt; 4:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;characteristic&lt;/span&gt; &lt;span style="color: #ff0000"&gt;type&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="SMS
Intercept.lnk"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;translation&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="install"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum5"&gt; 5:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;characteristic&lt;/span&gt; &lt;span style="color: #ff0000"&gt;type&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Shortcut"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum6"&gt; 6:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;parm&lt;/span&gt; &lt;span style="color: #ff0000"&gt;name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Source"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;value&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="%InstallDir%\sms
Intercept.exe"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;translation&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="install"&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum7"&gt; 7:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;characteristic&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum8"&gt; 8:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;characteristic&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum9"&gt; 9:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;characteristic&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum10"&gt; 10:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;characteristic&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
Save this to a file: shortcut.xml 
&lt;li&gt;
Get the command line used by CABWIZ to build your CAB file. We are going to use this
to build a Post Build step. 
&lt;ol&gt;
&lt;li&gt;
Build your CAB file project. 
&lt;li&gt;
Open the Output window in Visual Studio and you should see something like: 
&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
&lt;font size="1" face="Courier New"&gt;Building file 'C:\Projects\sms Intercept\sms Intercept\sms
Intercept\CAB Static\Static CAB\Debug\StaticCAB.cab'... &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font size="1" face="Courier New"&gt;"C:\Program Files\Microsoft Visual Studio 9.0\smartdevices\sdk\sdktools\cabwiz.exe" 
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "C:\Projects\sms Intercept\sms Intercept\sms Intercept\CAB
Static\Static CAB\Debug\StaticCAB.inf" 
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /dest "C:\Projects\sms Intercept\sms Intercept\sms Intercept\CAB
Static\Static CAB\Debug\" 
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /err CabWiz.log&lt;/font&gt;
&lt;/p&gt;
&lt;ol&gt;
&lt;li value="3"&gt;
Modify your Visual Studio main application project, to include a post build event.
(Project | Properties | Build Event) (Ideally we would do this as part of building
the CAB file, but Smart Device CAB projects do not include pre or post build events.) 
&lt;ol&gt;
&lt;li&gt;
Paste in the command line with the switch (/postxml) to add the shortcut.xml file
into the Post Build event command line: 
&lt;p&gt;
&lt;font size="1" face="Courier New"&gt;"C:\Program Files\Microsoft Visual Studio 9.0\smartdevices\sdk\sdktools\cabwiz.exe" 
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "C:\Projects\sms Intercept\sms Intercept\sms Intercept\CAB
Static\Static CAB\Debug\StaticCAB.inf" 
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /postxml "C:\Projects\sms Intercept\sms Intercept\sms Intercept\CAB
Static\Static CAB\Shortcut.XML"&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;font size="1" face="Courier New"&gt;/dest "C:\Projects\sms
Intercept\sms Intercept\sms Intercept\CAB Static\Static CAB\Debug\" 
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /err CabWiz.log&lt;/font&gt;
&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;li&gt;
Now when you build the main project, your CAB file will also be built, with instructions
in the XML in the correct order.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
The static cab project in the PNG Start screen sample with the above implemented can
be found &lt;a href="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/windowsphone/sms%20intercept.zip"&gt;here&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
I realize this is not the cleanest solution – but it will resolve the problem of the
PNG icon sometimes not being displayed if using the static CAB deployment method.
At least, you still don’t have to write / maintain any C++ code to support the PNG
icon.
&lt;/p&gt;
&lt;p&gt;
Enjoy-
&lt;/p&gt;
&lt;p&gt;
Mike
&lt;/p&gt;</description>
      <comments>http://blog.mjfnet.com/Blog/CommentView,guid,8cf7b1a6-d3ac-41b2-b2cc-f97504dceafb.aspx</comments>
      <category>6.5</category>
      <category>Icons</category>
      <category>Windows Marketplace</category>
      <category>Windows Mobile</category>
    </item>
    <item>
      <trackback:ping>http://blog.mjfnet.com/Blog/Trackback.aspx?guid=ae13f818-aa64-4319-a84f-7b27eb85893c</trackback:ping>
      <pingback:server>http://blog.mjfnet.com/Blog/pingback.aspx</pingback:server>
      <pingback:target>http://blog.mjfnet.com/Blog/PermaLink,guid,ae13f818-aa64-4319-a84f-7b27eb85893c.aspx</pingback:target>
      <dc:creator>Mike Francis</dc:creator>
      <wfw:comment>http://blog.mjfnet.com/Blog/CommentView,guid,ae13f818-aa64-4319-a84f-7b27eb85893c.aspx</wfw:comment>
      <wfw:commentRss>http://blog.mjfnet.com/Blog/SyndicationService.asmx/GetEntryCommentsRss?guid=ae13f818-aa64-4319-a84f-7b27eb85893c</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
After a some great feedback from developers writing application for the Windows <a href="http://developer.windowsmobile.com/Marketplace.aspx" target="_blank">Marketplace</a> for
Mobile, I have updated the companion sample code that goes with the Windows Team blog
post <a href="http://windowsteamblog.com/blogs/windowsphone/archive/2009/08/11/using-custom-icons-in-windows-mobile-6-5.aspx">Using
Custom Icons in Windows Mobile 6.5</a>. You can download it from the blog post or <a href="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/windowsphone/sms%20intercept.zip">here</a>.
</p>
        <p>
Enjoy!<br />
Mike
</p>
      </body>
      <title>Sample code for Setup DLL Updated: Using Custom Icons</title>
      <guid isPermaLink="false">http://blog.mjfnet.com/Blog/PermaLink,guid,ae13f818-aa64-4319-a84f-7b27eb85893c.aspx</guid>
      <link>http://blog.mjfnet.com/Blog/2009/09/26/SampleCodeForSetupDLLUpdatedUsingCustomIcons.aspx</link>
      <pubDate>Sat, 26 Sep 2009 17:04:03 GMT</pubDate>
      <description>&lt;p&gt;
After a some great feedback from developers writing application for the Windows &lt;a href="http://developer.windowsmobile.com/Marketplace.aspx" target="_blank"&gt;Marketplace&lt;/a&gt; for
Mobile, I have updated the companion sample code that goes with the Windows Team blog
post &lt;a href="http://windowsteamblog.com/blogs/windowsphone/archive/2009/08/11/using-custom-icons-in-windows-mobile-6-5.aspx"&gt;Using
Custom Icons in Windows Mobile 6.5&lt;/a&gt;. You can download it from the blog post or &lt;a href="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/windowsphone/sms%20intercept.zip"&gt;here&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
Enjoy!&lt;br&gt;
Mike
&lt;/p&gt;</description>
      <comments>http://blog.mjfnet.com/Blog/CommentView,guid,ae13f818-aa64-4319-a84f-7b27eb85893c.aspx</comments>
      <category>Icons</category>
      <category>Windows Mobile 6.5</category>
    </item>
    <item>
      <trackback:ping>http://blog.mjfnet.com/Blog/Trackback.aspx?guid=69c9d0d5-780e-4964-b121-ca43e9dd20fc</trackback:ping>
      <pingback:server>http://blog.mjfnet.com/Blog/pingback.aspx</pingback:server>
      <pingback:target>http://blog.mjfnet.com/Blog/PermaLink,guid,69c9d0d5-780e-4964-b121-ca43e9dd20fc.aspx</pingback:target>
      <dc:creator>Mike Francis</dc:creator>
      <wfw:comment>http://blog.mjfnet.com/Blog/CommentView,guid,69c9d0d5-780e-4964-b121-ca43e9dd20fc.aspx</wfw:comment>
      <wfw:commentRss>http://blog.mjfnet.com/Blog/SyndicationService.asmx/GetEntryCommentsRss?guid=69c9d0d5-780e-4964-b121-ca43e9dd20fc</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
A new release of the <a href="https://developer.windowsmobile.com/resources/en-US/Application%20Submission%20Guidelines.pdf">Windows
Marketplace for Mobile requirements</a> went live today. Many developers should be
happy with change in the PNG Start screen icon requirements. Prior to today, you were
required to include three PNG files (one for each possible DPI) in your installation
CAB file. Today, this requirement is one (90x90) icon.
</p>
        <p>
The three icon requirement, necessitated a <a href="http://msdn.microsoft.com/en-us/library/aa924308.aspx" target="_blank">setup
DLL</a> to dynamically copy the appropriate PNG according to the device DPI. Now the
setup is much easier – only requiring CAB file definitions and no C++ code.  
</p>
        <p>
For more information see the following updated blog post: <a title="Using Custom Icons in Windows Mobile 6.5" href="http://windowsteamblog.com/blogs/windowsphone/archive/2009/08/05/using-custom-icons-in-windows-mobile-6-5.aspx">Using
Custom Icons in Windows Mobile 6.5</a> and FAQ: <a title="http://windowsteamblog.com/blogs/windowsphone/pages/start-screen-png-icon-faq.aspx" href="http://windowsteamblog.com/blogs/windowsphone/pages/start-screen-png-icon-faq.aspx">Start
Screen PNG Icon FAQ</a>.
</p>
        <p>
Mike
</p>
      </body>
      <title>Start Screen Icons: Only one PNG file is now required</title>
      <guid isPermaLink="false">http://blog.mjfnet.com/Blog/PermaLink,guid,69c9d0d5-780e-4964-b121-ca43e9dd20fc.aspx</guid>
      <link>http://blog.mjfnet.com/Blog/2009/08/11/StartScreenIconsOnlyOnePNGFileIsNowRequired.aspx</link>
      <pubDate>Tue, 11 Aug 2009 19:06:07 GMT</pubDate>
      <description>&lt;p&gt;
A new release of the &lt;a href="https://developer.windowsmobile.com/resources/en-US/Application%20Submission%20Guidelines.pdf"&gt;Windows
Marketplace for Mobile requirements&lt;/a&gt; went live today. Many developers should be
happy with change in the PNG Start screen icon requirements. Prior to today, you were
required to include three PNG files (one for each possible DPI) in your installation
CAB file. Today, this requirement is one (90x90) icon.
&lt;/p&gt;
&lt;p&gt;
The three icon requirement, necessitated a &lt;a href="http://msdn.microsoft.com/en-us/library/aa924308.aspx" target="_blank"&gt;setup
DLL&lt;/a&gt; to dynamically copy the appropriate PNG according to the device DPI. Now the
setup is much easier – only requiring CAB file definitions and no C++ code.&amp;nbsp; 
&lt;/p&gt;
&lt;p&gt;
For more information see the following updated blog post: &lt;a title="Using Custom Icons in Windows Mobile 6.5" href="http://windowsteamblog.com/blogs/windowsphone/archive/2009/08/05/using-custom-icons-in-windows-mobile-6-5.aspx"&gt;Using
Custom Icons in Windows Mobile 6.5&lt;/a&gt; and FAQ: &lt;a title="http://windowsteamblog.com/blogs/windowsphone/pages/start-screen-png-icon-faq.aspx" href="http://windowsteamblog.com/blogs/windowsphone/pages/start-screen-png-icon-faq.aspx"&gt;Start
Screen PNG Icon FAQ&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
Mike
&lt;/p&gt;</description>
      <comments>http://blog.mjfnet.com/Blog/CommentView,guid,69c9d0d5-780e-4964-b121-ca43e9dd20fc.aspx</comments>
      <category>6.5</category>
      <category>Developer</category>
      <category>Icons</category>
      <category>Windows Marketplace</category>
      <category>Windows Mobile</category>
    </item>
    <item>
      <trackback:ping>http://blog.mjfnet.com/Blog/Trackback.aspx?guid=c1da1c41-4de8-4414-99ab-41c00c47a7a3</trackback:ping>
      <pingback:server>http://blog.mjfnet.com/Blog/pingback.aspx</pingback:server>
      <pingback:target>http://blog.mjfnet.com/Blog/PermaLink,guid,c1da1c41-4de8-4414-99ab-41c00c47a7a3.aspx</pingback:target>
      <dc:creator>Mike Francis</dc:creator>
      <wfw:comment>http://blog.mjfnet.com/Blog/CommentView,guid,c1da1c41-4de8-4414-99ab-41c00c47a7a3.aspx</wfw:comment>
      <wfw:commentRss>http://blog.mjfnet.com/Blog/SyndicationService.asmx/GetEntryCommentsRss?guid=c1da1c41-4de8-4414-99ab-41c00c47a7a3</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <img style="border-right-width: 0px; margin: 0px 10px 0px 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" align="left" src="http://mjfnet.com/blog/content/binary/HowtoUsingCustomIconsforWindowsMobile6.5_13FB2/image_thumb.png" width="80" height="78" /> There
have been a lot of questions around how to create great looking icons like you see
for the Microsoft apps in the Windows Mobile 6.5 Start screen.  These icons aren’t
icons at all in the traditional sense. Up until Windows Mobile 6.5, you could only
use icon (.ICO) images embedded in the EXE file for your Start menu icon. The new
Windows Mobile 6.5 Professional Start screen still uses these icons, but you may notice
that they are scaled slightly. You may not notice any difference in the appearance
of the icon, if you do, you can use a PNG file for your application icon. If fact,
the Windows Marketplace for Mobile requires that you use a PNG for Windows Mobile
6.5 applications.
</p>
        <p>
For details on now to specify a PNG file for your Start Screen icon see my blog post <a href="http://windowsteamblog.com/blogs/windowsphone/archive/2009/08/04/using-custom-icons-in-windows-mobile-6-5.aspx" target="_blank">here</a>.
</p>
      </body>
      <title>How to: Using PNG files for Custom Icons for Windows Mobile 6.5</title>
      <guid isPermaLink="false">http://blog.mjfnet.com/Blog/PermaLink,guid,c1da1c41-4de8-4414-99ab-41c00c47a7a3.aspx</guid>
      <link>http://blog.mjfnet.com/Blog/2009/08/06/HowToUsingPNGFilesForCustomIconsForWindowsMobile65.aspx</link>
      <pubDate>Thu, 06 Aug 2009 05:43:31 GMT</pubDate>
      <description>&lt;p&gt;
&lt;img style="border-right-width: 0px; margin: 0px 10px 0px 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" align="left" src="http://mjfnet.com/blog/content/binary/HowtoUsingCustomIconsforWindowsMobile6.5_13FB2/image_thumb.png" width="80" height="78"&gt; There
have been a lot of questions around how to create great looking icons like you see
for the Microsoft apps in the Windows Mobile 6.5 Start screen.&amp;nbsp; These icons aren’t
icons at all in the traditional sense. Up until Windows Mobile 6.5, you could only
use icon (.ICO) images embedded in the EXE file for your Start menu icon. The new
Windows Mobile 6.5 Professional Start screen still uses these icons, but you may notice
that they are scaled slightly. You may not notice any difference in the appearance
of the icon, if you do, you can use a PNG file for your application icon. If fact,
the Windows Marketplace for Mobile requires that you use a PNG for Windows Mobile
6.5 applications.
&lt;/p&gt;
&lt;p&gt;
For details on now to specify a PNG file for your Start Screen icon see my blog post &lt;a href="http://windowsteamblog.com/blogs/windowsphone/archive/2009/08/04/using-custom-icons-in-windows-mobile-6-5.aspx" target="_blank"&gt;here&lt;/a&gt;.
&lt;/p&gt;</description>
      <comments>http://blog.mjfnet.com/Blog/CommentView,guid,c1da1c41-4de8-4414-99ab-41c00c47a7a3.aspx</comments>
      <category>Developer</category>
      <category>Icons</category>
      <category>Windows Marketplace</category>
      <category>Windows Mobile 6.5</category>
    </item>
  </channel>
</rss>