<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>jeff germain's blog</title>
	<atom:link href="http://jeffgermain.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://jeffgermain.wordpress.com</link>
	<description>Using Gis.Software.Development;</description>
	<lastBuildDate>Wed, 25 Mar 2009 14:40:11 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<image>
		<url>http://www.gravatar.com/blavatar/4b2492a8596db4fc33b739d7c05c4036?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>jeff germain's blog</title>
		<link>http://jeffgermain.wordpress.com</link>
	</image>
			<item>
		<title>Developing with ArcObjects on Windows 64-bit OS</title>
		<link>http://jeffgermain.wordpress.com/2009/03/25/developing-with-arcobjects-on-windows-64-bit-os/</link>
		<comments>http://jeffgermain.wordpress.com/2009/03/25/developing-with-arcobjects-on-windows-64-bit-os/#comments</comments>
		<pubDate>Wed, 25 Mar 2009 14:40:11 +0000</pubDate>
		<dc:creator>Jeff Germain</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[ArcGIS]]></category>
		<category><![CDATA[ArcGIS Server]]></category>

		<guid isPermaLink="false">http://jeffgermain.wordpress.com/2009/03/25/developing-with-arcobjects-on-windows-64-bit-os/</guid>
		<description><![CDATA[Just a week into running on my new development box, Windows Server 2008 64, and everything had been smooth… until this bump in the road. While writing a utility COM component to extend ArcGIS Server, I ran into a serious gotcha. The issue actually was exposed while I was writing/running unit tests. Spinning up any [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeffgermain.wordpress.com&blog=721276&post=45&subd=jeffgermain&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Just a week into running on my new development box, Windows Server 2008 64, and everything had been smooth… until this bump in the road. While writing a utility COM component to extend ArcGIS Server, I ran into a serious gotcha. The issue actually was exposed while I was writing/running unit tests. Spinning up any ArcObjects in my tests were failing with the following runtime error:</p>
<blockquote><p><em>System.Runtime.InteropServices.COMException: Retrieving the COM class factory for component with CLSID {E01BE902-CC85-4B13-A828-02E789E0DDA9} failed due to the following error: 80040154.</em></p>
</blockquote>
<p>ArcObjects for .NET uses managed COM interop assemblies to access the 32-bit COM objects (unmanaged C++ core ArcObjects libraries). So, turns out the test project’s “Platform Target” property was set to “Any CPU”. </p>
<p><strong>The Fix?</strong></p>
<p>Change the project’s “Platform Target” property from “Any CPU” (VS defaults to this) to “x86”. </p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jeffgermain.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jeffgermain.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jeffgermain.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jeffgermain.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jeffgermain.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jeffgermain.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jeffgermain.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jeffgermain.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jeffgermain.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jeffgermain.wordpress.com/45/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeffgermain.wordpress.com&blog=721276&post=45&subd=jeffgermain&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://jeffgermain.wordpress.com/2009/03/25/developing-with-arcobjects-on-windows-64-bit-os/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/995ca2ed3d99c6a02626ae09651a45a6?s=96&#38;d=identicon" medium="image">
			<media:title type="html">Jeff</media:title>
		</media:content>
	</item>
		<item>
		<title>DynamicMapServiceLayer render complete event for ArcGIS JavaScript Extension for Google Maps API</title>
		<link>http://jeffgermain.wordpress.com/2008/10/22/dynamicmapservicelayer-render-complete-event-for-arcgis-javascript-extension-for-google-maps-api/</link>
		<comments>http://jeffgermain.wordpress.com/2008/10/22/dynamicmapservicelayer-render-complete-event-for-arcgis-javascript-extension-for-google-maps-api/#comments</comments>
		<pubDate>Tue, 21 Oct 2008 20:34:16 +0000</pubDate>
		<dc:creator>Jeff Germain</dc:creator>
				<category><![CDATA[AGS JS Extension for Google Maps API]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[ArcGIS]]></category>
		<category><![CDATA[ArcGIS Server]]></category>
		<category><![CDATA[Google Maps]]></category>
		<category><![CDATA[ArcGIS JavaScript Extension for Google Maps API]]></category>
		<category><![CDATA[DynamicMapServiceLayer]]></category>

		<guid isPermaLink="false">http://jeffgermain.wordpress.com/2008/10/07/dynamicmapservicelayer-render-complete-event-for-arcgis-javascript-extension-for-google-maps-api/</guid>
		<description><![CDATA[So I searched for an event I could hook into to to get notification when all layers have finished drawing on the map.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeffgermain.wordpress.com&blog=721276&post=34&subd=jeffgermain&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I&#8217;ve got a <a href="http://resources.esri.com/help/9.3/arcgisserver/apis/javascript/gmaps/help/topics/apiref.htm#class_esri.arcgis.gmaps.DynamicMapServiceLayer" target="_blank">DynamicMapServiceLayer</a> with 1000&#8217;s of features. So it takes a while to draw the overlay. This extra draw time justifies displaying a &#8220;loading&#8221; indicator image in the UI so as not to give the impression that the application has hung. So I searched for an event I could hook into to to get notification when all layers have finished drawing on the map. I tried the <a href="http://code.google.com/apis/maps/documentation/reference.html#GMap2.Events" target="_blank">events</a> on <a href="http://code.google.com/apis/maps/documentation/reference.html#GMap2" target="_blank">GMap2</a> (dragstart, dragend, movestart, moveend, zoomstart, zoomend), and while these let me know when to display my loading icon, they didn&#8217;t tell me when all layers had finished drawing. No luck. After pulling my hair out I got feedback from Praveenkumar Ponnusamy at ESRI.</p>
<h2>ArcGIS JS Extension for Google Maps API v1.2</h2>
<p><span style="text-decoration:line-through;">v1.2 will include a new event for the DynamicMapServiceLayer that you can wire up to get notification when the layer has finished drawing. </span></p>
<p><span style="text-decoration:line-through;"><strong><em>v1.2 is expected to be released around the end of October.</em></strong></span></p>
<p><span style="color:#ff0000;"><strong><em>Update:</em></strong><em> v1.2 has been released and delivers with it <a href="http://api.dojotoolkit.org/">Dojo v1.2</a>. You may now listen and respond to the </em></span><em><span style="color:#ff0000;"><strong>update </strong>event that has been added to <a href="http://resources.esri.com/help/9.3/arcgisserver/apis/javascript/gmaps/help/topics/apiref.htm#class_esri.arcgis.gmaps.DynamicMapServiceLayer">DynamicMapServiceLayer</a>, <a href="http://resources.esri.com/help/9.3/arcgisserver/apis/javascript/gmaps/help/topics/apiref.htm#class_esri.arcgis.gmaps.ImageServiceLayer">ImageServiceLayer</a>, and <a href="http://resources.esri.com/help/9.3/arcgisserver/apis/javascript/gmaps/help/topics/apiref.htm#class_esri.arcgis.gmaps.TiledMapServiceLayer">TiledMapServiceLayer</a>.</span><br />
</em></p>
<h2>ArcGIS JS Extension for Google Maps API v1.1</h2>
<p>In the meantime, here is a hack for v1.1. Note, this is NOT officially supported by ESRI and WILL NOT work at v1.2.</p>
<p><a href="http://forums.esri.com/Attachments/32761.zip" target="_blank">Download page sample</a></p>
<h4>Code</h4>
<table border="1" cellspacing="0" cellpadding="2" width="400">
<tbody>
<tr>
<td width="400" valign="top">
<pre class="code"><span style="background:#f8f8f8;color:blue;">&lt;</span><span style="background:#f8f8f8;color:#a31515;">script </span><span style="background:#f8f8f8;color:red;">type</span><span style="background:#f8f8f8;color:blue;">="text/javascript"&gt;
</span><span style="background:#f8f8f8;color:navy;">var </span><span style="background:#f8f8f8;color:maroon;">gmap</span><span style="background:#f8f8f8;">, </span><span style="background:#f8f8f8;color:maroon;">dynamicMapServicelayer</span><span style="background:#f8f8f8;">;

</span><span style="background:#f8f8f8;color:navy;">function </span><span style="background:#f8f8f8;color:maroon;">initialize</span><span style="background:#f8f8f8;">() {
  </span><span style="background:#f8f8f8;color:green;">//Load Google Maps
  </span><span style="background:#f8f8f8;color:maroon;">gmap </span><span style="background:#f8f8f8;">= </span><span style="background:#f8f8f8;color:navy;">new </span><span style="background:#f8f8f8;color:maroon;">GMap2</span><span style="background:#f8f8f8;">(</span><span style="background:#f8f8f8;color:maroon;">document</span><span style="background:#f8f8f8;">.</span><span style="background:#f8f8f8;color:maroon;">getElementById</span><span style="background:#f8f8f8;">(</span><span style="background:#ffffc1;">"map_canvas"</span><span style="background:#f8f8f8;">));
  </span><span style="background:#f8f8f8;color:maroon;">gmap</span><span style="background:#f8f8f8;">.</span><span style="background:#f8f8f8;color:maroon;">addControl</span><span style="background:#f8f8f8;">(</span><span style="background:#f8f8f8;color:navy;">new </span><span style="background:#f8f8f8;color:maroon;">GLargeMapControl</span><span style="background:#f8f8f8;">());
  </span><span style="background:#f8f8f8;color:maroon;">gmap</span><span style="background:#f8f8f8;">.</span><span style="background:#f8f8f8;color:maroon;">enableScrollWheelZoom</span><span style="background:#f8f8f8;">();
  </span><span style="background:#f8f8f8;color:maroon;">gmap</span><span style="background:#f8f8f8;">.</span><span style="background:#f8f8f8;color:maroon;">setCenter</span><span style="background:#f8f8f8;">(
    </span><span style="background:#f8f8f8;color:navy;">new </span><span style="background:#f8f8f8;color:maroon;">GLatLng</span><span style="background:#f8f8f8;">(</span><span style="background:#e6ffff;">36.62513340485903</span><span style="background:#f8f8f8;">, -</span><span style="background:#e6ffff;">112.32421875</span><span style="background:#f8f8f8;">), </span><span style="background:#e6ffff;">3</span><span style="background:#f8f8f8;">);

  </span><span style="background:#f8f8f8;color:maroon;">addUpdateEventWorkaround</span><span style="background:#f8f8f8;">();

  </span><span style="background:#f8f8f8;color:green;">//create dynamic map service layer
  </span><span style="background:#f8f8f8;color:maroon;">dynamicMapServicelayer </span><span style="background:#f8f8f8;">=
    </span><span style="background:#f8f8f8;color:navy;">new </span><span style="background:#f8f8f8;color:maroon;">esri</span><span style="background:#f8f8f8;">.</span><span style="background:#f8f8f8;color:maroon;">arcgis</span><span style="background:#f8f8f8;">.</span><span style="background:#f8f8f8;color:maroon;">gmaps</span><span style="background:#f8f8f8;">.</span><span style="background:#f8f8f8;color:maroon;">DynamicMapServiceLayer</span><span style="background:#f8f8f8;">(
    </span><span style="background:#ffffc1;">"http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/"</span><span style="background:#f8f8f8;"> +
    </span><span style="background:#ffffc1;">"Specialty/ESRI_StatesCitiesRivers_USA/MapServer"</span><span style="background:#f8f8f8;">,
    </span><span style="background:#f8f8f8;color:navy;">null</span><span style="background:#f8f8f8;">, </span><span style="background:#e6ffff;">0.75</span><span style="background:#f8f8f8;">, </span><span style="background:#f8f8f8;color:maroon;">dynamicMapServiceLoaded</span><span style="background:#f8f8f8;">);
}

</span><span style="background:#f8f8f8;color:navy;">function </span><span style="background:#f8f8f8;color:maroon;">dynamicMapServiceLoaded</span><span style="background:#f8f8f8;">(</span><span style="background:#f8f8f8;color:maroon;">mapService</span><span style="background:#f8f8f8;">) {
  </span><span style="background:#f8f8f8;color:maroon;">gmap</span><span style="background:#f8f8f8;">.</span><span style="background:#f8f8f8;color:maroon;">addOverlay</span><span style="background:#f8f8f8;">(</span><span style="background:#f8f8f8;color:maroon;">dynamicMapServicelayer</span><span style="background:#f8f8f8;">);
}

</span><span style="background:#f8f8f8;color:navy;">function </span><span style="background:#f8f8f8;color:maroon;">addUpdateEventWorkaround</span><span style="background:#f8f8f8;">() {
  </span><span style="background:#f8f8f8;color:green;">/************************************************/
  // !!!!!!!! ALERT: IMPORTANT NOTE !!!!!!!!
  // This workaround is NOT officially supported and WILL NOT work
  // at version 1.2 So, PLEASE include a FIXME note in your code to
  // remove this workaround once you start using version 1.2
  /************************************************/
  // save the original redraw handler
  </span><span style="background:#f8f8f8;color:navy;">var </span><span style="background:#f8f8f8;color:maroon;">_redrawHandler </span><span style="background:#f8f8f8;">=
    </span><span style="background:#f8f8f8;color:maroon;">esri</span><span style="background:#f8f8f8;">.</span><span style="background:#f8f8f8;color:maroon;">arcgis</span><span style="background:#f8f8f8;">.</span><span style="background:#f8f8f8;color:maroon;">gmaps</span><span style="background:#f8f8f8;">.</span><span style="background:#f8f8f8;color:maroon;">DynamicMapServiceLayer</span><span style="background:#f8f8f8;">.</span><span style="background:#f8f8f8;color:maroon;">prototype</span><span style="background:#f8f8f8;">.</span><span style="background:#f8f8f8;color:maroon;">_redrawHandler</span><span style="background:#f8f8f8;">;
  </span><span style="background:#f8f8f8;color:green;">// create a new method to handle layer redraw
  </span><span style="background:#f8f8f8;color:maroon;">esri</span><span style="background:#f8f8f8;">.</span><span style="background:#f8f8f8;color:maroon;">arcgis</span><span style="background:#f8f8f8;">.</span><span style="background:#f8f8f8;color:maroon;">gmaps</span><span style="background:#f8f8f8;">.</span><span style="background:#f8f8f8;color:maroon;">DynamicMapServiceLayer</span><span style="background:#f8f8f8;">.</span><span style="background:#f8f8f8;color:maroon;">prototype</span><span style="background:#f8f8f8;">.</span><span style="background:#f8f8f8;color:maroon;">_redrawHandler </span><span style="background:#f8f8f8;">=
    </span><span style="background:#f8f8f8;color:navy;">function</span><span style="background:#f8f8f8;">() {
        </span><span style="background:#f8f8f8;color:green;">// setup listener for image load event
        </span><span style="background:#f8f8f8;color:navy;">var </span><span style="background:#f8f8f8;color:maroon;">listener </span><span style="background:#f8f8f8;">= </span><span style="background:#f8f8f8;color:maroon;">GEvent</span><span style="background:#f8f8f8;">.</span><span style="background:#f8f8f8;color:maroon;">addDomListener</span><span style="background:#f8f8f8;">(</span><span style="background:#f8f8f8;color:navy;">this</span><span style="background:#f8f8f8;">.</span><span style="background:#f8f8f8;color:maroon;">_img_loading</span><span style="background:#f8f8f8;">, </span><span style="background:#ffffc1;">"load"</span><span style="background:#f8f8f8;">,
            </span><span style="background:#f8f8f8;color:navy;">function</span><span style="background:#f8f8f8;">() {
              </span><span style="background:#f8f8f8;color:maroon;">GEvent</span><span style="background:#f8f8f8;">.</span><span style="background:#f8f8f8;color:maroon;">removeListener</span><span style="background:#f8f8f8;">(</span><span style="background:#f8f8f8;color:maroon;">listener</span><span style="background:#f8f8f8;">);
              </span><span style="background:#f8f8f8;color:maroon;">listener </span><span style="background:#f8f8f8;">= </span><span style="background:#f8f8f8;color:navy;">null</span><span style="background:#f8f8f8;">;
              </span><span style="background:#f8f8f8;color:maroon;">GLog</span><span style="background:#f8f8f8;">.</span><span style="background:#f8f8f8;color:maroon;">write</span><span style="background:#f8f8f8;">(</span><span style="background:#ffffc1;">"Map image has been loaded"</span><span style="background:#f8f8f8;">);
              </span><span style="background:#f8f8f8;color:green;">// include code here to remove your "image loading" message
            </span><span style="background:#f8f8f8;">});
        </span><span style="background:#f8f8f8;color:green;">// call the actual redraw handler
        </span><span style="background:#f8f8f8;color:maroon;">_redrawHandler</span><span style="background:#f8f8f8;">.</span><span style="background:#f8f8f8;color:maroon;">apply</span><span style="background:#f8f8f8;">(</span><span style="background:#f8f8f8;color:navy;">this</span><span style="background:#f8f8f8;">, </span><span style="background:#f8f8f8;color:maroon;">arguments</span><span style="background:#f8f8f8;">);
  }
}

</span><span style="background:#f8f8f8;color:blue;">&lt;/</span><span style="background:#f8f8f8;color:#a31515;">script</span><span style="background:#f8f8f8;color:blue;">&gt;</span></pre>
</td>
</tr>
</tbody>
</table>
<p>Thanks Praveenkumar!</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jeffgermain.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jeffgermain.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jeffgermain.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jeffgermain.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jeffgermain.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jeffgermain.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jeffgermain.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jeffgermain.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jeffgermain.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jeffgermain.wordpress.com/34/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeffgermain.wordpress.com&blog=721276&post=34&subd=jeffgermain&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://jeffgermain.wordpress.com/2008/10/22/dynamicmapservicelayer-render-complete-event-for-arcgis-javascript-extension-for-google-maps-api/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/995ca2ed3d99c6a02626ae09651a45a6?s=96&#38;d=identicon" medium="image">
			<media:title type="html">Jeff</media:title>
		</media:content>
	</item>
		<item>
		<title>Microsoft Save as PDF or XPS</title>
		<link>http://jeffgermain.wordpress.com/2008/09/12/microsoft-save-as-pdf-or-xps/</link>
		<comments>http://jeffgermain.wordpress.com/2008/09/12/microsoft-save-as-pdf-or-xps/#comments</comments>
		<pubDate>Fri, 12 Sep 2008 12:23:02 +0000</pubDate>
		<dc:creator>Jeff Germain</dc:creator>
				<category><![CDATA[Documentation]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[help documentation]]></category>
		<category><![CDATA[microsoft office]]></category>
		<category><![CDATA[PDF]]></category>
		<category><![CDATA[XPS]]></category>

		<guid isPermaLink="false">http://jeffgermain.wordpress.com/2008/09/12/microsoft-save-as-pdf-or-xps/</guid>
		<description><![CDATA[Yesterday I was creating user and install guides for some software we&#8217;re wrapping up. Typically I use the open source PDFCreator print driver from Word, but it doesn&#8217;t create bookmarks from headings in the Word documents and the images lose quality. Not to worry&#8230; 2007 Microsoft Office Add-in: Microsoft Save as PDF or XPS does [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeffgermain.wordpress.com&blog=721276&post=32&subd=jeffgermain&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Yesterday I was creating user and install guides for some software we&#8217;re wrapping up. Typically I use the open source <a href="http://sourceforge.net/projects/pdfcreator/" target="_blank">PDFCreator</a> print driver from Word, but it doesn&#8217;t create bookmarks from headings in the Word documents and the images lose quality. Not to worry&#8230; <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=4d951911-3e7e-4ae6-b059-a2e79ed87041&amp;displaylang=en&amp;Hash=XEfG9trxtJfzK7sZokVKrCgXsMuGnHU73rCM67SZ%2fWwWAKYMQGGxhqo1wgd3MmoY%2fDSP%2fpfocm9DDUUHXLlbSw%3d%3d" target="_blank">2007 Microsoft Office Add-in: Microsoft Save as PDF or XPS</a> does this and more and all from within Windows programs for FREE.</p>
<p>More on <a href="http://www.marclironblog.com/microsoft/introducing-the-microsoft-xps-document-format/" target="_blank">XPS format</a></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/jeffgermain.wordpress.com/32/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/jeffgermain.wordpress.com/32/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jeffgermain.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jeffgermain.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jeffgermain.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jeffgermain.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jeffgermain.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jeffgermain.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jeffgermain.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jeffgermain.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jeffgermain.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jeffgermain.wordpress.com/32/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeffgermain.wordpress.com&blog=721276&post=32&subd=jeffgermain&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://jeffgermain.wordpress.com/2008/09/12/microsoft-save-as-pdf-or-xps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/995ca2ed3d99c6a02626ae09651a45a6?s=96&#38;d=identicon" medium="image">
			<media:title type="html">Jeff</media:title>
		</media:content>
	</item>
		<item>
		<title>Cache Dependency in ASP.NET</title>
		<link>http://jeffgermain.wordpress.com/2008/08/20/cache-dependency-in-aspnet/</link>
		<comments>http://jeffgermain.wordpress.com/2008/08/20/cache-dependency-in-aspnet/#comments</comments>
		<pubDate>Wed, 20 Aug 2008 13:52:13 +0000</pubDate>
		<dc:creator>Jeff Germain</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[ArcGIS Server]]></category>
		<category><![CDATA[cache]]></category>
		<category><![CDATA[configuration]]></category>
		<category><![CDATA[dependency]]></category>

		<guid isPermaLink="false">http://jeffgermain.wordpress.com/2008/08/20/cache-dependency-in-aspnet/</guid>
		<description><![CDATA[Cool things with System.Web.Caching.CacheDependency.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeffgermain.wordpress.com&blog=721276&post=31&subd=jeffgermain&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Cool things with <a href="http://msdn.microsoft.com/en-us/library/system.web.caching.cachedependency.aspx" target="_blank">System.Web.Caching.CacheDependency</a>. This simple example stores some settings for a table of contents control in an ASP.NET application. The settings in the configuration file apply to all users. One requirement is that the admin must be able to edit these settings and make them available to the application without interruption. This we achieve with the CacheDependency class.</p>
<table cellspacing="0" cellpadding="2" width="492" border="1">
<tbody>
<tr>
<td valign="top" width="490">
<div style="font-size:8pt;background:#f8f8f8;color:black;font-family:courier new;">
<div style="font-size:8pt;background:#f8f8f8;color:black;font-family:courier new;">
<div style="font-size:8pt;background:#f8f8f8;color:black;font-family:courier new;">
<div style="font-size:8pt;background:#f8f8f8;color:black;font-family:courier new;">
<p style="margin:0;"><span style="color:gray;">///</span><span style="color:green;"> </span><span style="color:gray;">&lt;summary&gt;</span></p>
<p style="margin:0;"><span style="color:gray;">///</span><span style="color:green;"> Key for the TableOfContentsSettings stored in </span></p>
<p style="margin:0;"><span style="color:gray;">///</span><span style="color:green;"> ASP.NET application&#8217;s Cache.</span></p>
<p style="margin:0;"><span style="color:gray;">///</span><span style="color:green;"> </span><span style="color:gray;">&lt;/summary&gt;</span></p>
<p style="margin:0;"><span style="color:navy;">private</span> <span style="color:navy;">const</span> <span style="color:navy;">string</span> <span style="color:maroon;">_tocSettingsIdentifier</span> = </p>
<p style="margin:0;">&nbsp;&nbsp;&nbsp; <span style="background:#ffb997;">&#8220;TableOfContentsSettingsIdentifier&#8221;</span>;</p>
<p style="margin:0;">&nbsp;</p>
<p style="margin:0;"><span style="color:gray;">///</span><span style="color:green;"> </span><span style="color:gray;">&lt;summary&gt;</span></p>
<p style="margin:0;"><span style="color:gray;">///</span><span style="color:green;"> Gets or sets the table of contents settings.</span></p>
<p style="margin:0;"><span style="color:gray;">///</span><span style="color:green;"> </span><span style="color:gray;">&lt;/summary&gt;</span></p>
<p style="margin:0;"><span style="color:gray;">///</span><span style="color:green;"> </span><span style="color:gray;">&lt;value&gt;</span><span style="color:green;">The table of contents settings.</span><span style="color:gray;">&lt;/value&gt;</span></p>
<p style="margin:0;"><span style="color:navy;">private</span> <span style="color:#a65300;">NameValueCollection</span> <span style="color:maroon;">TableOfContentsSettings</span></p>
<p style="margin:0;">{</p>
<p style="margin:0;">&nbsp;&nbsp;&nbsp; <span style="color:navy;">get</span></p>
<p style="margin:0;">&nbsp;&nbsp;&nbsp; {</p>
<p style="margin:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color:navy;">object</span> <span style="color:maroon;">settingsCollectionObject</span> = </p>
<p style="margin:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color:navy;">this</span>.<span style="color:maroon;">Page</span>.<span style="color:maroon;">Cache</span>[<span style="color:maroon;">_tocSettingsIdentifier</span>];</p>
<p style="margin:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color:navy;">if</span> (<span style="color:maroon;">settingsCollectionObject</span> != <span style="color:navy;">null</span>)</p>
<p style="margin:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</p>
<p style="margin:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color:navy;">return</span> <span style="color:maroon;">settingsCollectionObject</span> </p>
<p style="margin:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color:navy;">as</span> <span style="color:#a65300;">NameValueCollection</span>;</p>
<p style="margin:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p>
<p style="margin:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color:navy;">else</span></p>
<p style="margin:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</p>
<p style="margin:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color:teal;">// Read the TOC settings stored in our XML file</span></p>
<p style="margin:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color:#a65300;">NameValueCollection</span> <span style="color:maroon;">settingsCollection</span> = </p>
<p style="margin:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color:maroon;">ReadConfiguration</span>();</p>
<p style="margin:0;">&nbsp;</p>
<p style="margin:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color:teal;">// Support &#8220;real time&#8221; updates where admin edits </span></p>
<p style="margin:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color:teal;">// config file. We&#8217;ll set up a dependency on the </span></p>
<p style="margin:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color:teal;">// the XML config file. If the file is modified in any </span></p>
<p style="margin:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color:teal;">// way, it will be purged from the cache, forcing </span></p>
<p style="margin:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color:teal;">// this block to run the next time the </span></p>
<p style="margin:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color:teal;">// TableOfContentsSettings is requested. Cool.</span></p>
<p style="margin:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color:navy;">string</span> <span style="color:maroon;">filename</span> = <span style="color:navy;">this</span>.<span style="color:maroon;">GetConfigurationFilePath</span>();</p>
<p style="margin:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color:#a65300;">CacheDependency</span> <span style="color:maroon;">dependency</span> = </p>
<p style="margin:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color:navy;">new</span> <span style="color:#a65300;">CacheDependency</span>(<span style="color:maroon;">filename</span>, <span style="color:#a65300;">DateTime</span>.<span style="color:maroon;">Now</span>);</p>
<p style="margin:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color:navy;">this</span>.<span style="color:maroon;">Page</span>.<span style="color:maroon;">Cache</span>.<span style="color:maroon;">Insert</span>(<span style="color:maroon;">_tocSettingsIdentifier</span>, </p>
<p style="margin:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color:maroon;">settingsCollection</span>, <span style="color:maroon;">dependency</span>);</p>
<p style="margin:0;">&nbsp;</p>
<p style="margin:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color:teal;">// Set the changed flag so we know to update </span></p>
<p style="margin:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color:teal;">// the browser. Don&#8217;t set it if first time loading.</span></p>
<p style="margin:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color:navy;">if</span> (<span style="color:navy;">this</span>.<span style="color:maroon;">Page</span>.<span style="color:maroon;">IsPostBack</span> || <span style="color:navy;">this</span>.<span style="color:maroon;">Page</span>.<span style="color:maroon;">IsCallback</span>)</p>
<p style="margin:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</p>
<p style="margin:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color:navy;">this</span>.<span style="color:maroon;">HasSettingsChanged</span> = <span style="color:navy;">true</span>;</p>
<p style="margin:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p>
<p style="margin:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p>
<p style="margin:0;">&nbsp;</p>
<p style="margin:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color:navy;">return</span> <span style="color:maroon;">config</span>;</p>
<p style="margin:0;">&nbsp;&nbsp;&nbsp; }</p>
<p style="margin:0;">&nbsp;&nbsp;&nbsp; <span style="color:navy;">set</span></p>
<p style="margin:0;">&nbsp;&nbsp;&nbsp; {</p>
<p style="margin:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color:navy;">this</span>.<span style="color:maroon;">Page</span>.<span style="color:maroon;">Cache</span>[<span style="color:maroon;">_tocSettingsIdentifier</span>] = <span style="color:navy;">value</span>;</p>
<p style="margin:0;">&nbsp;&nbsp;&nbsp; }</p>
<p style="margin:0;">}</p>
</div>
</div>
</div>
</div>
</td>
</tr>
</tbody>
</table>
<p>Read up on the options the <a href="http://msdn.microsoft.com/en-us/library/system.web.caching.cachedependency.aspx" target="_blank">CacheDependency</a> class gives you. You can set up dependencies on other objects, files, arrays, etc.</p>
<h2>See Also</h2>
<p><a href="http://msdn.microsoft.com/en-us/library/6hbbsfk6(VS.80).aspx" target="_blank">Caching Application Data</a></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/jeffgermain.wordpress.com/31/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/jeffgermain.wordpress.com/31/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jeffgermain.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jeffgermain.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jeffgermain.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jeffgermain.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jeffgermain.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jeffgermain.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jeffgermain.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jeffgermain.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jeffgermain.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jeffgermain.wordpress.com/31/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeffgermain.wordpress.com&blog=721276&post=31&subd=jeffgermain&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://jeffgermain.wordpress.com/2008/08/20/cache-dependency-in-aspnet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/995ca2ed3d99c6a02626ae09651a45a6?s=96&#38;d=identicon" medium="image">
			<media:title type="html">Jeff</media:title>
		</media:content>
	</item>
		<item>
		<title>Managing Icons and Bitmaps in Your ArcGIS and Windows Applications</title>
		<link>http://jeffgermain.wordpress.com/2007/03/05/managing-icons-and-bitmaps-in-your-arcgis-and-windows-applications/</link>
		<comments>http://jeffgermain.wordpress.com/2007/03/05/managing-icons-and-bitmaps-in-your-arcgis-and-windows-applications/#comments</comments>
		<pubDate>Mon, 05 Mar 2007 15:03:40 +0000</pubDate>
		<dc:creator>Jeff Germain</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[ArcMap]]></category>

		<guid isPermaLink="false">http://jeffgermain.wordpress.com/2007/03/05/managing-icons-and-bitmaps-in-your-arcgis-and-windows-applications/</guid>
		<description><![CDATA[Something I wanted to streamline for my development team was icon and bitmap management; or rather taking as much of the decision making process out of the equation. The strategies I have taken have the following benefits.
Time / Efficiency

I don’t want developers spending any time digging around for or capturing an icon/bitmap. Period.
I don’t want [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeffgermain.wordpress.com&blog=721276&post=22&subd=jeffgermain&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Something I wanted to streamline for my development team was icon and bitmap management; or rather taking as much of the decision making process out of the equation. The strategies I have taken have the following benefits.</p>
<h5><strong>Time / Efficiency</strong></h5>
<ul>
<li>I don’t want developers spending any time digging around for or capturing an icon/bitmap. Period.</li>
<li>I don’t want 10 different methods written to assign an image to a control; which would require a minimum of 10 unit tests be written, and so on.</li>
<li>I do want to be able to change an icon or bitmap in one place and have that automatically update all projects. Really, how many copies of the folder browser image do you need across projects?</li>
<li>I want a single location where our custom ArcGIS command icons are stored.</li>
</ul>
<h5><strong>Consistent Presentation Layer</strong></h5>
<ul>
<li>Icons and bitmaps should be consistent across the presentation layers. I prefer to use Windows icons to ensure user recognition of functionality and purpose. I don’t want icons from different Windows OS mixed either. Office XP icons look dated on Vista… And Office 2000 icons look like ass on XP and Vista. By the same token, if your company has spent the money and bought an icon library then you want only images from that library used in your software. The one acception to this rule is the outdated ArcGIS icon library. I will mix these into my UI for example when a button&#8217;s functionality is to select features.</li>
</ul>
<p>What follows is a brief primer on how to get started building an icon and bitmap library, and a utility class with methods for retrieving those images.</p>
<h4><strong>The Utilities Assembly</strong></h4>
<p>I have created a sample Utilities library to be referenced by any project requiring icons or bitmaps. This includes custom Windows Forms, ArcGIS ICommand classes, custom property pages, etc. This project contains a “Resources” folder that holds the icons and bitmaps, has entries in the Resources.resx file, and an IconHelper class.</p>
<p><strong>Adding Icons and Bitmaps</strong></p>
<p>I started by first creating a “Resources” folder within the project. Next, I built my icon and bitmap library by adding the desired icons and bitmaps to that folder. I rename these files appending “Icon” or “Bitmap” (Example: Save.ico to SaveIcon.ico). This makes it easier to identify the image type when using the My feature in VB.NET (Example: My.Resources.SaveIcon).</p>
<h5><strong>The IconHelper Class</strong></h5>
<p>I created enums for both icons and bitmaps providing intuitive names… the actual file name minus the “Icon” or “Bitmap” you may have appended to it. Here you could do some logical groupings if you wanted for such things as EnumTextEditorIcons and such.</p>
<p>This is just one example that is included in the sample.</p>
<p>The enum:</p>
<blockquote>
<p style="background:#f8f8f8 none repeat scroll 0 50%;font-size:9pt;color:black;font-family:arial unicode ms;">
<p style="margin:0;"><span style="color:teal;">&#8221;&#8217; </span><span style="color:gray;">&lt;summary&gt;</span></p>
<p style="margin:0;"><span style="color:teal;">&#8221;&#8217; Enum for common Icons. </span></p>
<p style="margin:0;"><span style="color:teal;">&#8221;&#8217; </span><span style="color:gray;">&lt;/summary&gt;</span></p>
<p style="margin:0;"><span style="color:navy;">Public</span> <span style="color:navy;">Enum</span> <span style="color:maroon;">EnumIcon</span></p>
<p style="margin:0;">    <span style="color:maroon;">AddNew</span></p>
<p style="margin:0;">    <span style="color:maroon;">Copy</span></p>
<p style="margin:0;">    <span style="color:maroon;">Delete</span></p>
<p style="margin:0;">    <span style="color:maroon;">ErrorProvider</span></p>
<p style="margin:0;">    <span style="color:maroon;">Folder</span></p>
<p style="margin:0;">    <span style="color:maroon;">Help</span></p>
<p style="margin:0;">    <span style="color:maroon;">etc&#8230;</span></p>
<p style="margin:0;"><span style="color:navy;">End</span> <span style="color:navy;">Enum</span></p>
</blockquote>
<p>The method to retrieve the icon using the enum:</p>
<blockquote>
<p style="background:#f8f8f8 none repeat scroll 0 50%;font-size:9pt;color:black;font-family:arial unicode ms;">
<p style="margin:0;"><span style="color:teal;">&#8221;&#8217; </span><span style="color:gray;">&lt;summary&gt;</span></p>
<p style="margin:0;"><span style="color:teal;">&#8221;&#8217; Gets an icon from the embedded resources.</span></p>
<p style="margin:0;"><span style="color:teal;">&#8221;&#8217; </span><span style="color:gray;">&lt;/summary&gt;</span></p>
<p style="margin:0;"><span style="color:teal;">&#8221;&#8217; </span><span style="color:gray;">&lt;param name=&#8221;iconImage&#8221;&gt;</span><span style="color:teal;">The icon image.</span><span style="color:gray;">&lt;/param&gt;</span></p>
<p style="margin:0;"><span style="color:navy;">Shared</span> <span style="color:navy;">Function</span> <span style="color:maroon;">GetIcon</span>(<span style="color:navy;">ByVal</span> <span style="color:maroon;">iconImage</span> <span style="color:navy;">As</span> <span style="color:maroon;">EnumIcon</span>) <span style="color:navy;">As</span> <span style="color:maroon;">Icon</span></p>
<p style="margin:0;">    <span style="color:navy;">Select</span> <span style="color:navy;">Case</span> <span style="color:maroon;">iconImage</span></p>
<p style="margin:0;">        <span style="color:navy;">Case</span> <span style="color:maroon;">EnumIcon</span>.<span style="color:maroon;">AddNew</span></p>
<p style="margin:0;">            <span style="color:navy;">Return</span> <span style="color:navy;">My</span>.<span style="color:maroon;">Resources</span>.<span style="color:maroon;">AddNewIcon</span></p>
<p style="margin:0;">        <span style="color:navy;">Case</span> <span style="color:maroon;">EnumIcon</span>.<span style="color:maroon;">Copy</span></p>
<p style="margin:0;">            <span style="color:navy;">Return</span> <span style="color:navy;">My</span>.<span style="color:maroon;">Resources</span>.<span style="color:maroon;">CopyIcon</span></p>
<p style="margin:0;">        <span style="color:navy;">Case</span> <span style="color:maroon;">EnumIcon</span>.<span style="color:maroon;">Delete</span></p>
<p style="margin:0;">            <span style="color:navy;">Return</span> <span style="color:navy;">My</span>.<span style="color:maroon;">Resources</span>.<span style="color:maroon;">DeleteIcon</span></p>
<p style="margin:0;">        <span style="color:navy;">Case</span> <span style="color:maroon;">EnumIcon</span>.<span style="color:maroon;">Folder</span></p>
<p style="margin:0;">            <span style="color:navy;">Return</span> <span style="color:navy;">My</span>.<span style="color:maroon;">Resources</span>.<span style="color:maroon;">FolderIcon</span></p>
<p style="margin:0;">        <span style="color:navy;">Case</span> <span style="color:maroon;">EnumIcon</span>.<span style="color:maroon;">Help</span></p>
<p style="margin:0;">            <span style="color:navy;">Return</span> <span style="color:navy;">My</span>.<span style="color:maroon;">Resources</span>.<span style="color:maroon;">HelpIcon</span></p>
<p style="margin:0;">        <span style="color:navy;">etc&#8230;</span></p>
<p style="margin:0;">        <span style="color:navy;">Case</span> <span style="color:navy;">Else</span></p>
<p style="margin:0;">            <span style="color:navy;">Return</span> <span style="color:navy;">Nothing</span></p>
<p style="margin:0;">    <span style="color:navy;">End</span> <span style="color:navy;">Select</span></p>
<p style="margin:0;"><span style="color:navy;">End</span> <span style="color:navy;">Function</span></p>
</blockquote>
<p>Putting it all together in the UI:</p>
<blockquote>
<p style="background:#f8f8f8 none repeat scroll 0 50%;font-size:9pt;color:black;font-family:arial unicode ms;">
<p style="margin:0;"><span style="color:teal;">&#8216; Assign an image to a Button control</span></p>
<p style="margin:0;"><span style="color:navy;">Me</span>.<span style="color:maroon;">FolderBrowserButton</span>.<span style="color:maroon;">Image</span> = <span style="color:maroon;">_</span></p>
<p style="margin:0;">    <span style="color:maroon;">IconHelper</span>.<span style="color:maroon;">GetIcon</span>(<span style="color:maroon;">EnumIcon</span>.<span style="color:maroon;">Folder</span>).<span style="color:maroon;">ToBitmap</span>()</p>
<p style="margin:0;">&nbsp;</p>
<p style="margin:0;"><span style="color:teal;">&#8216;Add bitmap MxCommand   </span></p>
<p style="margin:0;"><span style="color:navy;">MyBase</span>.<span style="color:maroon;">m_bitmap</span> = <span style="color:maroon;">_</span></p>
<p style="margin:0;"><span style="color:maroon;">IconHelper</span>.<span style="color:maroon;">GetIcon(</span><span style="color:maroon;">EnumCustomArcGisCommands</span>.<span style="color:maroon;">ReportsGenerator</span>).<span style="color:maroon;">ToBitmap</span>()</p>
</blockquote>
<h4><strong>The Sample</strong></h4>
<p>The sample illustrates how to use the utility class in a Windows Form and shows other ways to expand this idea.</p>
<p>Download <a href="http://www.mediafire.com/?fjqdw0ynyl0" title="VB.NET sample" target="_blank">VB.NET sample</a> or C# sample.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/jeffgermain.wordpress.com/22/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/jeffgermain.wordpress.com/22/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jeffgermain.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jeffgermain.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jeffgermain.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jeffgermain.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jeffgermain.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jeffgermain.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jeffgermain.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jeffgermain.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jeffgermain.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jeffgermain.wordpress.com/22/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeffgermain.wordpress.com&blog=721276&post=22&subd=jeffgermain&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://jeffgermain.wordpress.com/2007/03/05/managing-icons-and-bitmaps-in-your-arcgis-and-windows-applications/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/995ca2ed3d99c6a02626ae09651a45a6?s=96&#38;d=identicon" medium="image">
			<media:title type="html">Jeff</media:title>
		</media:content>
	</item>
		<item>
		<title>Source Code Documentation in VB.NET</title>
		<link>http://jeffgermain.wordpress.com/2007/02/14/source-code-documentation-in-vbnet/</link>
		<comments>http://jeffgermain.wordpress.com/2007/02/14/source-code-documentation-in-vbnet/#comments</comments>
		<pubDate>Wed, 14 Feb 2007 15:44:37 +0000</pubDate>
		<dc:creator>Jeff Germain</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Documentation]]></category>
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://jeffgermain.wordpress.com/2007/02/14/source-code-documentation-in-vbnet/</guid>
		<description><![CDATA[I recently discovered GhostDoc which is a free add-in for Visual Studio .NET (2003 &#38; 2005). It&#8217;s a handy tool that generates XML documentation comments. This tool was written for C# developers but has extended beta support for VB.NET. What&#8217;s nice about it is that it reinforces the idea of using full descriptive names when [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeffgermain.wordpress.com&blog=721276&post=16&subd=jeffgermain&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I recently discovered <a href="http://www.roland-weigelt.de/ghostdoc/" target="_blank">GhostDoc</a> which is a free add-in for Visual Studio .NET (2003 &amp; 2005). It&#8217;s a handy tool that generates XML documentation comments. This tool was written for C# developers but has extended beta support for VB.NET. What&#8217;s nice about it is that it reinforces the idea of using full descriptive names when creating methods, properties, parameters, etc. It will create a descriptive summary by dissecting the member name and formulating a sentence. It&#8217;s about as hands free as it gets!</p>
<p>I&#8217;ve been using it in my VB.NET projects with much success. While it doesn&#8217;t always get it 100% right, it does get you 95% of the way there. Definitely a time saver.</p>
<p>If you want to use it within VB.NET you&#8217;ll need to enable this feature in the configuration dialog. Go to Tools | GhostDoc | Configure GhostDoc and select the Options tab. There you&#8217;ll find a checkbox for this feature.</p>
<p><a href="http://jeffgermain.files.wordpress.com/2007/02/windowslivewritersourcecodedocumentationinvb.net-74feghostdoc-vboption31.jpg" target="_new"><img src="http://jeffgermain.files.wordpress.com/2007/02/windowslivewritersourcecodedocumentationinvb.net-74feghostdoc-vboption-thumb11.jpg?w=240&#038;h=218" alt="" width="240" height="218" /></a></p>
<p>I&#8217;ve barely scratched the surface of this tools capabilities. You can set it up to add the username or timestamp when documenting members. Lot&#8217;s more too! So have a look.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/jeffgermain.wordpress.com/16/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/jeffgermain.wordpress.com/16/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jeffgermain.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jeffgermain.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jeffgermain.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jeffgermain.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jeffgermain.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jeffgermain.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jeffgermain.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jeffgermain.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jeffgermain.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jeffgermain.wordpress.com/16/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeffgermain.wordpress.com&blog=721276&post=16&subd=jeffgermain&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://jeffgermain.wordpress.com/2007/02/14/source-code-documentation-in-vbnet/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/995ca2ed3d99c6a02626ae09651a45a6?s=96&#38;d=identicon" medium="image">
			<media:title type="html">Jeff</media:title>
		</media:content>

		<media:content url="http://jeffgermain.files.wordpress.com/2007/02/windowslivewritersourcecodedocumentationinvb.net-74feghostdoc-vboption-thumb11.jpg" medium="image" />
	</item>
		<item>
		<title>Debugging Custom ArcGIS 9.1 Components in Visual Studio .NET 2003</title>
		<link>http://jeffgermain.wordpress.com/2007/02/14/debugging-custom-arcgis-91-components-in-visual-studio-net-2003/</link>
		<comments>http://jeffgermain.wordpress.com/2007/02/14/debugging-custom-arcgis-91-components-in-visual-studio-net-2003/#comments</comments>
		<pubDate>Tue, 13 Feb 2007 21:38:05 +0000</pubDate>
		<dc:creator>Jeff Germain</dc:creator>
				<category><![CDATA[Debugging]]></category>

		<guid isPermaLink="false">http://jeffgermain.wordpress.com/2007/02/14/debugging-custom-arcgis-91-components-in-visual-studio-net-2003/</guid>
		<description><![CDATA[If you have both the .NET 1.1 and 2.0 Frameworks installed on your development machine you will run into troubles when trying to debug ArcGIS 9.1 components written on the .NET 1.1 Framework. This is because ArcMap is an unmanaged application and as such when it initializes it loads the most current .NET Framework installed [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeffgermain.wordpress.com&blog=721276&post=12&subd=jeffgermain&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>If you have both the .NET 1.1 and 2.0 Frameworks installed on your development machine you will run into troubles when trying to debug ArcGIS 9.1 components written on the .NET 1.1 Framework. This is because ArcMap is an unmanaged application and as such when it initializes it loads the most current .NET Framework installed on the system. Not to fret though as it’s easily overcome using a configuration file.</p>
<p>Simply copy the following to a text file and save it as &lt;ApplicationName&gt;.&lt;ApplicationExtension&gt;.config<br />
So, a config file for ArcMap would be named ArcMap.exe.config.</p>
<blockquote><p>&lt;?xml version=&#8221;1.0&#8243; encoding=&#8221;utf-8&#8243; ?&gt;<br />
&lt;configuration&gt;<br />
&lt;startup&gt;<br />
&lt;supportedRuntime version=&#8221;v1.1.4322&#8243; /&gt;<br />
&lt;/startup&gt;<br />
&lt;/configuration&gt;</p></blockquote>
<p>Save this file to the ArcGIS bin directory. The default location for this directory is C:\Program Files\ArcGIS\Bin.</p>
<p>Now you’re set to debug .NET 1.1 components. When you need to debug .NET 2.0 components simply rename the file to ArcMap.exe.config.xxx.</p>
<p>You can read more from ESRI <a target="_blank" href="http://support.esri.com/index.cfm?fa=knowledgebase.techarticles.articleShow&amp;d=29695">here</a>.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/jeffgermain.wordpress.com/12/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/jeffgermain.wordpress.com/12/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jeffgermain.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jeffgermain.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jeffgermain.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jeffgermain.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jeffgermain.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jeffgermain.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jeffgermain.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jeffgermain.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jeffgermain.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jeffgermain.wordpress.com/12/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeffgermain.wordpress.com&blog=721276&post=12&subd=jeffgermain&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://jeffgermain.wordpress.com/2007/02/14/debugging-custom-arcgis-91-components-in-visual-studio-net-2003/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/995ca2ed3d99c6a02626ae09651a45a6?s=96&#38;d=identicon" medium="image">
			<media:title type="html">Jeff</media:title>
		</media:content>
	</item>
		<item>
		<title>Task Manager Missing Tabs</title>
		<link>http://jeffgermain.wordpress.com/2007/02/02/task-manager-missing-tabs/</link>
		<comments>http://jeffgermain.wordpress.com/2007/02/02/task-manager-missing-tabs/#comments</comments>
		<pubDate>Fri, 02 Feb 2007 16:39:10 +0000</pubDate>
		<dc:creator>Jeff Germain</dc:creator>
				<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://jeffgermain.wordpress.com/2007/02/02/task-manager-missing-tabs/</guid>
		<description><![CDATA[I&#8217;ve had an annoying problem for a while now and finally got around to looking into it. My Task Manager was missing all it&#8217;s tabs. In fact, it was getting displayed without being hosted within its usual Windows Form. I had no idea what I did to deserve this. See below.

Anyways, it&#8217;s an easy fix. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeffgermain.wordpress.com&blog=721276&post=6&subd=jeffgermain&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I&#8217;ve had an annoying problem for a while now and finally got around to looking into it. My Task Manager was missing all it&#8217;s tabs. In fact, it was getting displayed without being hosted within its usual Windows Form. I had no idea what I did to deserve this. See below.</p>
<p><a href="http://jeffgermain.files.wordpress.com/2007/02/taskmgr1.jpg" title="Task Manager Issue"><img src="http://jeffgermain.files.wordpress.com/2007/02/taskmgr1.jpg" alt="Task Manager Issue" /></a></p>
<p>Anyways, it&#8217;s an easy fix. Simply double-click anywhere around the border to viola! it&#8217;s back!. Double-click again and it goes back into this minimalist mode.</p>
<p><a href="http://jeffgermain.files.wordpress.com/2007/02/taskmgr2.jpg" title="Task Manager Fix"><img src="http://jeffgermain.files.wordpress.com/2007/02/taskmgr2.jpg" alt="Task Manager Fix" /></a></p>
<p><a href="http://jeffgermain.files.wordpress.com/2007/02/taskmgr3.jpg" title="Task Manager Fixed"><img src="http://jeffgermain.files.wordpress.com/2007/02/taskmgr3.thumbnail.jpg" alt="Task Manager Fixed" /></a></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/jeffgermain.wordpress.com/6/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/jeffgermain.wordpress.com/6/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jeffgermain.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jeffgermain.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jeffgermain.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jeffgermain.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jeffgermain.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jeffgermain.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jeffgermain.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jeffgermain.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jeffgermain.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jeffgermain.wordpress.com/6/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeffgermain.wordpress.com&blog=721276&post=6&subd=jeffgermain&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://jeffgermain.wordpress.com/2007/02/02/task-manager-missing-tabs/feed/</wfw:commentRss>
		<slash:comments>47</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/995ca2ed3d99c6a02626ae09651a45a6?s=96&#38;d=identicon" medium="image">
			<media:title type="html">Jeff</media:title>
		</media:content>

		<media:content url="http://jeffgermain.files.wordpress.com/2007/02/taskmgr1.jpg" medium="image">
			<media:title type="html">Task Manager Issue</media:title>
		</media:content>

		<media:content url="http://jeffgermain.files.wordpress.com/2007/02/taskmgr2.jpg" medium="image">
			<media:title type="html">Task Manager Fix</media:title>
		</media:content>

		<media:content url="http://jeffgermain.files.wordpress.com/2007/02/taskmgr3.thumbnail.jpg" medium="image">
			<media:title type="html">Task Manager Fixed</media:title>
		</media:content>
	</item>
	</channel>
</rss>