<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" 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:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>Programming</title>
        <link>http://geekswithblogs.net/mtreadwell/category/343.aspx</link>
        <description>Thoughts on how a hobbyist programmer approaches the .NET framework.</description>
        <language>en-US</language>
        <copyright>Mark Treadwell</copyright>
        <managingEditor>eep@narboza.com</managingEditor>
        <generator>Subtext Version 0.0.0.0</generator>
        <item>
            <title>Custom Forms Designer: Toolbox and ToolboxService - Part 1</title>
            <link>http://geekswithblogs.net/mtreadwell/archive/2007/10/25/116359.aspx</link>
            <description>&lt;p&gt;Reminder: All posts in this series can be found &lt;a href="http://geekswithblogs.net/mtreadwell/category/7229.aspx"&gt;here&lt;/a&gt;.  &lt;/p&gt;&lt;p&gt;The Toolbox and the &lt;a href="http://msdn2.microsoft.com/en-us/library/system.componentmodel.design.designsurface(VS.80).aspx" target="_blank"&gt;DesignSurface&lt;/a&gt; work together to allow a developer to add new components and controls to the design surface.  There are two interfaces that implement this functionality: &lt;a href="http://msdn2.microsoft.com/en-us/library/system.drawing.design.itoolboxservice(vs.80).aspx" target="_blank"&gt;IToolboxService&lt;/a&gt; and &lt;a href="http://msdn2.microsoft.com/en-us/library/system.drawing.design.itoolboxuser(VS.80).aspx" target="_blank"&gt;IToolboxUser&lt;/a&gt;.  &lt;/p&gt;&lt;p&gt;&lt;strong&gt;IToolboxService&lt;/strong&gt; defines an interface that provides methods and properties to manage and query the Toolbox capabilities in a development environment.  All forms designer systems must implement the IToolboxService in their Toolbox in order to provide the expected Windows Forms UI functionality.  This service is added to the &lt;a href="http://geekswithblogs.net/mtreadwell/archive/2007/10/22/116248.aspx" target="_blank"&gt;ServiceContainer&lt;/a&gt; and can be accessed at any time. There are 15 methods and two properties in the interface which I will not cover here in detail.  Many of those methods deal with adding, deleting and selecting Toolbox items.  &lt;/p&gt;&lt;p&gt;&lt;strong&gt;IToolboxUser&lt;/strong&gt; defines an interface for setting the currently selected toolbox item and indicating whether a designer supports a particular toolbox item.  A forms designer will implement an IToolboxUser interface that consists of only two methods: GetToolSupported and ToolPicked.  You use GetToolSupported to filter the items that can be added onto the designer.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Implementation&lt;/strong&gt;:  There are several steps you have to take to build a Toolbox for a Forms Designer system.&lt;/p&gt; &lt;ol&gt; &lt;li&gt;Create a user interface that displays the tools to the user.  This is typically implemented as a classic &lt;a href="http://msdn.microsoft.com/msdnmag/issues/04/12/CustomFormsDesigner/" target="_blank"&gt;TreeView&lt;/a&gt;, or as &lt;a href="http://msdn.microsoft.com/msdnmag/issues/06/03/DesignerHosting/" target="_blank"&gt;sliding tree control&lt;/a&gt; that behaves much like Windows Explorer, but without grid or connection lines.  Building the desired functionality can take quite a bit of time.  There is a nice Code Project &lt;a href="http://www.codeproject.com/cs/miscctrl/IPToolbox.asp" target="_blank"&gt;article&lt;/a&gt; that has a mostly-complete solution with multi-level tabs.  There are several design decisions you will have to make before you start coding.  Besides the visual representation already noted, you must decide how you will discover, categorize, and load the tools.  One of the &lt;a title="Microsoft Developer Network" href="http://msdn.microsoft.com/" target="_blank"&gt;MSDN&lt;/a&gt; Magazine &lt;a href="http://msdn.microsoft.com/msdnmag/issues/04/12/CustomFormsDesigner/#S3" target="_blank"&gt;articles&lt;/a&gt; describes three methods: hard coding (not recommended), configuration file, and attribute decorated classes loaded from a known location and checked using reflection. &lt;/li&gt;&lt;li&gt;Implement the IToolboxService.  The three main members of this interface are GetSelectedToolboxItem, SerializeToolboxItem, and DeserializeToolboxItem.  Other useful members include GetCursor, IsSupported, IsToolboxItem, and SelectedToolboxItemUsed. &lt;/li&gt;&lt;li&gt;Plug the IToolboxService implementation into the design-time environment. &lt;/li&gt;&lt;li&gt;Create a keyboard interface. &lt;/li&gt;&lt;li&gt;Handle Toolbox events, such as tool selection, keyboard, mouse clicks and drag and drop.&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;&lt;strong&gt;Usage&lt;/strong&gt;: There are four ways a developer can add a component or control to a forms designer DesignSurface; one uses the keyboard, while the other three use the mouse.  The Visual Studio Toolbox functions are described &lt;a href="http://msdn2.microsoft.com/en-us/library/ms165354(vs.80).aspx" target="_blank"&gt;here&lt;/a&gt;.  I will talk about the changes required to the sample application to implement the Visual Studio functionality in Part 2 of this post.&lt;/p&gt; &lt;ol&gt; &lt;li&gt;&lt;u&gt;Keyboard&lt;/u&gt;:  The Visual Studio Toolbox keyboard interface is described &lt;a href="http://msdn2.microsoft.com/en-us/library/k8hcfy22(VS.80).aspx" target="_blank"&gt;here&lt;/a&gt;.  Essentially, you Ctrl+Tab/cursor to the Toolbox (or press Ctrl+Alt+X), cursor to the desired control and hit Enter. The control will be added to the DesignSurface.  Ctrl+Up Arrow, Ctrl+Down Arrow, Left Arrow, and Right Arrow also have control functions within the Toolbox.  &lt;/li&gt;&lt;li&gt;&lt;u&gt;Mouse&lt;/u&gt;: Double-Click a Toolbox icon.  The control will be added to the DesignSurface.  This has the same effect as using the keyboard method.  &lt;/li&gt;&lt;li&gt;&lt;u&gt;Mouse&lt;/u&gt;: Single Click a Toolbox icon.  Move the cursor over the DesignSurface, were it will turn to a Crosshair ready for you to click and drag the desired control location and size.  Visual Studio customizes the Crosshair cursor with color overlay of the selected tool icon until the mouse has been clicked and released.  This operation can be canceled with the Esc key. &lt;/li&gt;&lt;li&gt;&lt;u&gt;Mouse&lt;/u&gt;: Drag and Drop a Toolbox icon.  Click a control icon, drag it onto the DesignSurface, and drop it where you want it.  This operation can be canceled with the Esc key.&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;To allow the icons from the Toolbox to be added to the DesignSurface using the mouse or keyboard, the Toolbox in the sample code hooks onto the KeyDown and MouseDown events.  IToolboxUser.ToolPicked is called for the Enter key or a mouse double-click.  The sample code shows how to serialize the ToolboxItem into a DataObject and to DoDragDrop for when a mouse single-click event occurs.  IToolboxService.SerializeToolboxItem will be called on mouse up and the item will be added to the designer.  &lt;/p&gt;&lt;p&gt;When a new control or component is added to the DesignSurface from the Toolbox, the NameCreationService is used to give it a unique name.  My discussion of this service and my modifications to the sample code are described &lt;a href="http://geekswithblogs.net/mtreadwell/archive/2007/10/18/116143.aspx" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=116359"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=116359" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/mtreadwell/aggbug/116359.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Mark Treadwell</dc:creator>
            <guid>http://geekswithblogs.net/mtreadwell/archive/2007/10/25/116359.aspx</guid>
            <pubDate>Fri, 26 Oct 2007 03:41:24 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/mtreadwell/comments/116359.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/mtreadwell/archive/2007/10/25/116359.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/mtreadwell/comments/commentRss/116359.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/mtreadwell/services/trackbacks/116359.aspx</trackback:ping>
        </item>
        <item>
            <title>Custom Forms Designer: ServiceContainer</title>
            <link>http://geekswithblogs.net/mtreadwell/archive/2007/10/22/116248.aspx</link>
            <description>&lt;p&gt;Reminder: All posts in this series can be found &lt;a title="Custom Forms Designer Series" href="http://geekswithblogs.net/mtreadwell/category/7229.aspx"&gt;here&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;Simply, it is a container for services.  Services are classes that have a well-known interface, that have instantiations which be stored in service containers, can be obtained from a service provider, and are addressable by type.  The ServiceContainer class is a service provider and implements IServiceProvider.  You obtain a service by supplying the Type of the service you want to the service provider's GetService method.  The ServiceContainer.GetService method is declared like this.&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;font size="2"&gt;&lt;span style="color: rgb(0,0,255)"&gt;public&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;virtual&lt;/span&gt; &lt;span style="color: rgb(43,145,175)"&gt;Object&lt;/span&gt; GetService(&lt;span style="color: rgb(43,145,175)"&gt;Type&lt;/span&gt; serviceType);&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt; &lt;p&gt;This is how you obtain a a reference to a service in a class derived from DesignSurfaceManager or DesignSurface.  The cast is required because GetService returns an Object.&lt;/p&gt; &lt;blockquote&gt;&lt;pre class="code"&gt;&lt;font size="2"&gt;&lt;span style="color: rgb(43,145,175)"&gt;INameCreationService&lt;/span&gt; serviceNameCreation &lt;span style="color: rgb(128,128,0)"&gt;=&lt;/span&gt; (&lt;span style="color: rgb(43,145,175)"&gt;INameCreationService&lt;/span&gt;)(&lt;span style="color: rgb(0,0,255)"&gt;this&lt;/span&gt;&lt;span style="color: rgb(128,128,0)"&gt;.&lt;/span&gt;GetService(&lt;span style="color: rgb(0,0,255)"&gt;typeof&lt;/span&gt;(&lt;span style="color: rgb(43,145,175)"&gt;INameCreationService&lt;/span&gt;)));&lt;/font&gt;&lt;/pre&gt;&lt;/blockquote&gt;
&lt;p&gt;Both DesignSurfaceManager and DesignSurface implement ServiceContainer.  This may appear to lead to confusion, but you do not have to keep track of which container holds what service.  One of the nice features of using the DesignSurfaceManager class is that it automatically merges services between it and the DesignSurfaces.&lt;/p&gt;
&lt;p&gt;There is no documentation of how to use these multiple implementations, but it makes sense to put general, non-DesignSurface services such as IHelpService, IDesignerEventService, and INameCreationService in the central DesignSurfaceManager ServiceContainer.  DesignSurface-specific services such as ISelectionService would logically be with each DesignSurface.ServiceContainer.&lt;/p&gt;
&lt;p&gt;MSDN states the following about the DesignSurfaceManager.ServiceContainer Property: The DesignSurfaceManager class provides several design-time services automatically.  You can override each of these services by replacing them in the protected &lt;font color="#000000"&gt;&lt;span style="color: rgb(0,0,255)"&gt;&lt;font color="#000000"&gt;ServiceContainer property.  To replace a service, override the constructor, call base, and make any changes through the protected ServiceContainer property.  All services added to the service container that implement the &lt;/font&gt;&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;&lt;font color="#000000"&gt;IDisposable interface are disposed when the design surface manager is disposed.  The DesignSurfaceManager class provides the&lt;/font&gt; &lt;/span&gt;&lt;/font&gt;&lt;span style="color: rgb(0,0,255)"&gt;&lt;font color="#000000"&gt;IDesignerEventService interface as the default service.  IDesignerEventService provides a global eventing mechanism for designer events.  With this mechanism, an application is informed when a designer becomes active.  The service provides a collection of designers and a single place where global objects, such as the Properties window, can monitor selection change events.&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;What is interesting here is that MSDN itself does not state what the default design-time services are.  A MSDN Magazine designer hosting &lt;a href="http://msdn.microsoft.com/msdnmag/issues/06/03/DesignerHosting/"&gt;article&lt;/a&gt; provides a &lt;a href="http://msdn.microsoft.com/msdnmag/issues/06/03/DesignerHosting/default.aspx?loc=&amp;amp;fig=true#fig4" target="_blank"&gt;table&lt;/a&gt; of the default DesignSurface design-time services.  An important part of that table is listing which services are not replaceable due to their interrelationships.  I wrote some code to see what services were running in the two containers for the sample application and found the following.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;font size="2"&gt;HostSurfaceManager.ServiceContainer Services&lt;br /&gt;--------------------------------------------&lt;br /&gt;IDesignerEventService&lt;br /&gt;INameCreationService&lt;br /&gt;IToolboxService&lt;br /&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;HostSurface.ServiceContainer Services&lt;br /&gt;--------------------------------------------&lt;br /&gt;IComponentChangeService&lt;br /&gt;IDesignerEventService&lt;br /&gt;IDesignerHost&lt;br /&gt;IExtenderListService&lt;br /&gt;IExtenderProviderService&lt;br /&gt;IInheritanceService&lt;br /&gt;IMenuCommandService&lt;br /&gt;INameCreationService&lt;br /&gt;IReferenceService&lt;br /&gt;ISelectionService&lt;br /&gt;IToolboxService&lt;br /&gt;ITypeDescriptorFilterService&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;This list matches almost perfectly with the default design-time service table noted above.  It was not surprising to see the three HostSurfaceManager services were also visible from the HostSurface because the System.ComponentModel.Design.DesignSurfaceManager has a small bit of code in its MergedServiceProvider GetService method that looks like the following: &lt;/p&gt;
&lt;blockquote&gt;&lt;pre class="code"&gt;&lt;font size="2"&gt;&lt;span style="color: rgb(43,145,175)"&gt;Object&lt;/span&gt; service &lt;span style="color: rgb(128,128,0)"&gt;=&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;this&lt;/span&gt;&lt;span style="color: rgb(128,128,0)"&gt;.&lt;/span&gt;_primaryProvider&lt;span style="color: rgb(128,128,0)"&gt;.&lt;/span&gt;GetService(serviceType);
&lt;span style="color: rgb(0,0,255)"&gt;if&lt;/span&gt; (service &lt;span style="color: rgb(128,128,0)"&gt;==&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;null&lt;/span&gt;)
{
  service &lt;span style="color: rgb(128,128,0)"&gt;=&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;this&lt;/span&gt;&lt;span style="color: rgb(128,128,0)"&gt;.&lt;/span&gt;_secondaryProvider&lt;span style="color: rgb(128,128,0)"&gt;.&lt;/span&gt;GetService(serviceType);
}&lt;br /&gt;&lt;span style="color: rgb(0,0,255)"&gt;return&lt;/span&gt; service;&lt;/font&gt;&lt;/pre&gt;&lt;/blockquote&gt;The primary provider for the HostSurface is its own ServiceContainer.  The secondary provider for the HostSurface is the HostSurfaceManager.ServiceContainer.  As shown in the code snippet, any HostSurface service is preferred over an identical one in the HostSurfaceManager.  Any service unavailable in the HostSurface but present in the HostSurfaceManager is accessible as well.&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=116248"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=116248" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/mtreadwell/aggbug/116248.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Mark Treadwell</dc:creator>
            <guid>http://geekswithblogs.net/mtreadwell/archive/2007/10/22/116248.aspx</guid>
            <pubDate>Tue, 23 Oct 2007 02:15:32 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/mtreadwell/comments/116248.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/mtreadwell/archive/2007/10/22/116248.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/mtreadwell/comments/commentRss/116248.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/mtreadwell/services/trackbacks/116248.aspx</trackback:ping>
        </item>
        <item>
            <title>Custom Forms Designer: Name Creation Service</title>
            <link>http://geekswithblogs.net/mtreadwell/archive/2007/10/18/116143.aspx</link>
            <description>&lt;p&gt;Reminder: All posts in this series can be found &lt;a title="Custom Forms Designer Series" href="http://geekswithblogs.net/mtreadwell/category/7229.aspx"&gt;here&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;The first code I will look at is from one of the simplest services supporting the Windows Forms designer.  The Name Creation Service is called each time you drop a control/component onto the visual design surface.  Your job is to return a unique name for the new control that also means something.&lt;/p&gt; &lt;p&gt;The standard process, &lt;a href="http://blogs.msdn.com/brada/pages/361363.aspx"&gt;per convention&lt;/a&gt;, is to take the control/component Type name, camel case it (lower case the first letter) since it will be a member variable, and then append a digit suffix to make it unique from all other controls/components on the form.  The number ensures it remains &lt;a href="http://msdn2.microsoft.com/en-us/library/x2dbyw72(VS.71).aspx"&gt;unique&lt;/a&gt; for languages which are not case sensitive.&lt;/p&gt; &lt;p&gt;The &lt;a href="http://download.microsoft.com/download/f/2/7/f279e71e-efb0-4155-873d-5554a0608523/DesignerHosting.exe"&gt;sample code&lt;/a&gt; implements only the &lt;a href="http://msdn2.microsoft.com/en-us/library/system.componentmodel.design.serialization.inamecreationservice.createname.aspx"&gt;INameCreationService.CreateName&lt;/a&gt; method.  I modeled my implementation off of the sample code for &lt;a href="http://msdn2.microsoft.com/en-us/library/system.componentmodel.design.serialization.inamecreationservice_members.aspx"&gt;INameCreationService&lt;/a&gt; &lt;a href="http://msdn2.microsoft.com/en-us/library/system.componentmodel.design.serialization.inamecreationservice.aspx"&gt;here&lt;/a&gt;.  I found the sample &lt;a href="http://msdn2.microsoft.com/en-us/library/system.componentmodel.design.serialization.inamecreationservice.createname.aspx"&gt;CreateName&lt;/a&gt; code to be excessively complex:&lt;/p&gt;&lt;pre class="code"&gt;&lt;font size="1"&gt;    &lt;span style="color: rgb(0,0,255)"&gt;string&lt;/span&gt; &lt;span style="color: rgb(43,145,175)"&gt;INameCreationService&lt;/span&gt;&lt;span style="color: rgb(128,128,0)"&gt;.&lt;/span&gt;CreateName(&lt;span style="color: rgb(43,145,175)"&gt;IContainer&lt;/span&gt; container, &lt;span style="color: rgb(43,145,175)"&gt;Type&lt;/span&gt; type)
    {
      &lt;span style="color: rgb(43,145,175)"&gt;ComponentCollection&lt;/span&gt; cc &lt;span style="color: rgb(128,128,0)"&gt;=&lt;/span&gt; container&lt;span style="color: rgb(128,128,0)"&gt;.&lt;/span&gt;Components;
      &lt;span style="color: rgb(0,0,255)"&gt;int&lt;/span&gt; min &lt;span style="color: rgb(128,128,0)"&gt;=&lt;/span&gt; &lt;span style="color: rgb(43,145,175)"&gt;Int32&lt;/span&gt;&lt;span style="color: rgb(128,128,0)"&gt;.&lt;/span&gt;MaxValue;
      &lt;span style="color: rgb(0,0,255)"&gt;int&lt;/span&gt; max &lt;span style="color: rgb(128,128,0)"&gt;=&lt;/span&gt; &lt;span style="color: rgb(43,145,175)"&gt;Int32&lt;/span&gt;&lt;span style="color: rgb(128,128,0)"&gt;.&lt;/span&gt;MinValue;
      &lt;span style="color: rgb(0,0,255)"&gt;int&lt;/span&gt; count &lt;span style="color: rgb(128,128,0)"&gt;=&lt;/span&gt; &lt;span style="color: rgb(255,0,255)"&gt;0&lt;/span&gt;;
      &lt;span style="color: rgb(0,0,255)"&gt;for&lt;/span&gt; (&lt;span style="color: rgb(0,0,255)"&gt;int&lt;/span&gt; i &lt;span style="color: rgb(128,128,0)"&gt;=&lt;/span&gt; &lt;span style="color: rgb(255,0,255)"&gt;0&lt;/span&gt;; i &lt;span style="color: rgb(128,128,0)"&gt;&amp;lt;&lt;/span&gt; cc&lt;span style="color: rgb(128,128,0)"&gt;.&lt;/span&gt;Count; i&lt;span style="color: rgb(128,128,0)"&gt;++&lt;/span&gt;)
      {
        &lt;span style="color: rgb(43,145,175)"&gt;Component&lt;/span&gt; comp &lt;span style="color: rgb(128,128,0)"&gt;=&lt;/span&gt; cc[i] &lt;span style="color: rgb(0,0,255)"&gt;as&lt;/span&gt; &lt;span style="color: rgb(43,145,175)"&gt;Component&lt;/span&gt;;
        &lt;span style="color: rgb(0,0,255)"&gt;if&lt;/span&gt; (comp&lt;span style="color: rgb(128,128,0)"&gt;.&lt;/span&gt;GetType() &lt;span style="color: rgb(128,128,0)"&gt;==&lt;/span&gt; type)
        {
          count&lt;span style="color: rgb(128,128,0)"&gt;++&lt;/span&gt;;
          &lt;span style="color: rgb(0,0,255)"&gt;string&lt;/span&gt; name &lt;span style="color: rgb(128,128,0)"&gt;=&lt;/span&gt; comp&lt;span style="color: rgb(128,128,0)"&gt;.&lt;/span&gt;Site&lt;span style="color: rgb(128,128,0)"&gt;.&lt;/span&gt;Name;
          &lt;span style="color: rgb(0,0,255)"&gt;if&lt;/span&gt; (name&lt;span style="color: rgb(128,128,0)"&gt;.&lt;/span&gt;StartsWith(type&lt;span style="color: rgb(128,128,0)"&gt;.&lt;/span&gt;Name))
          {
            &lt;/font&gt;&lt;font size="1"&gt;&lt;span style="color: rgb(0,0,255)"&gt;try
&lt;/span&gt;            {
              &lt;span style="color: rgb(0,0,255)"&gt;int&lt;/span&gt; value &lt;span style="color: rgb(128,128,0)"&gt;=&lt;/span&gt; &lt;span style="color: rgb(43,145,175)"&gt;Int32&lt;/span&gt;&lt;span style="color: rgb(128,128,0)"&gt;.&lt;/span&gt;Parse(name&lt;span style="color: rgb(128,128,0)"&gt;.&lt;/span&gt;Substring(type&lt;span style="color: rgb(128,128,0)"&gt;.&lt;/span&gt;Name&lt;span style="color: rgb(128,128,0)"&gt;.&lt;/span&gt;Length));
              &lt;span style="color: rgb(0,0,255)"&gt;if&lt;/span&gt; (value &lt;span style="color: rgb(128,128,0)"&gt;&amp;lt;&lt;/span&gt; min)
                min &lt;span style="color: rgb(128,128,0)"&gt;=&lt;/span&gt; value;
              &lt;span style="color: rgb(0,0,255)"&gt;if&lt;/span&gt; (value &lt;span style="color: rgb(128,128,0)"&gt;&amp;gt;&lt;/span&gt; max)
                max &lt;span style="color: rgb(128,128,0)"&gt;=&lt;/span&gt; value;
            }
            &lt;span style="color: rgb(0,0,255)"&gt;catch&lt;/span&gt; (&lt;span style="color: rgb(43,145,175)"&gt;Exception&lt;/span&gt; ex)
            {
              Trace&lt;span style="color: rgb(128,128,0)"&gt;.&lt;/span&gt;WriteLine(ex&lt;span style="color: rgb(128,128,0)"&gt;.&lt;/span&gt;ToString());
            }
          }
        }
      }&lt;/font&gt;&lt;span style="color: rgb(0,128,0)"&gt;
&lt;/span&gt;&lt;font size="1"&gt;      &lt;span style="color: rgb(0,0,255)"&gt;if&lt;/span&gt; (count &lt;span style="color: rgb(128,128,0)"&gt;==&lt;/span&gt; &lt;span style="color: rgb(255,0,255)"&gt;0&lt;/span&gt;)
        &lt;span style="color: rgb(0,0,255)"&gt;return&lt;/span&gt; type&lt;span style="color: rgb(128,128,0)"&gt;.&lt;/span&gt;Name &lt;span style="color: rgb(128,128,0)"&gt;+&lt;/span&gt; &lt;span style="color: rgb(163,21,21)"&gt;"1"&lt;/span&gt;;
      &lt;span style="color: rgb(0,0,255)"&gt;else&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;if&lt;/span&gt; (min &lt;span style="color: rgb(128,128,0)"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color: rgb(255,0,255)"&gt;1&lt;/span&gt;)
      {
        &lt;span style="color: rgb(0,0,255)"&gt;int&lt;/span&gt; j &lt;span style="color: rgb(128,128,0)"&gt;=&lt;/span&gt; min &lt;span style="color: rgb(128,128,0)"&gt;-&lt;/span&gt; &lt;span style="color: rgb(255,0,255)"&gt;1&lt;/span&gt;;
        &lt;span style="color: rgb(0,0,255)"&gt;return&lt;/span&gt; type&lt;span style="color: rgb(128,128,0)"&gt;.&lt;/span&gt;Name &lt;span style="color: rgb(128,128,0)"&gt;+&lt;/span&gt; j&lt;span style="color: rgb(128,128,0)"&gt;.&lt;/span&gt;ToString();
      }
      &lt;/font&gt;&lt;font size="1"&gt;&lt;span style="color: rgb(0,0,255)"&gt;else
&lt;/span&gt;      {
        &lt;span style="color: rgb(0,0,255)"&gt;int&lt;/span&gt; j &lt;span style="color: rgb(128,128,0)"&gt;=&lt;/span&gt; max &lt;span style="color: rgb(128,128,0)"&gt;+&lt;/span&gt; &lt;span style="color: rgb(255,0,255)"&gt;1&lt;/span&gt;;
        &lt;span style="color: rgb(0,0,255)"&gt;return&lt;/span&gt; type&lt;span style="color: rgb(128,128,0)"&gt;.&lt;/span&gt;Name &lt;span style="color: rgb(128,128,0)"&gt;+&lt;/span&gt; j&lt;span style="color: rgb(128,128,0)"&gt;.&lt;/span&gt;ToString();
      }
    }&lt;/font&gt;&lt;/pre&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;p&gt;My implementation is simpler:&lt;/p&gt;&lt;pre class="code"&gt;&lt;font size="1"&gt;    &lt;span style="color: rgb(43,145,175)"&gt;String&lt;/span&gt; &lt;span style="color: rgb(43,145,175)"&gt;INameCreationService&lt;/span&gt;&lt;span style="color: rgb(128,128,0)"&gt;.&lt;/span&gt;CreateName(&lt;span style="color: rgb(43,145,175)"&gt;IContainer&lt;/span&gt; container, &lt;span style="color: rgb(43,145,175)"&gt;Type&lt;/span&gt; dataType)
    {
      &lt;span style="color: rgb(0,0,255)"&gt;if&lt;/span&gt; (dataType &lt;span style="color: rgb(128,128,0)"&gt;==&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;null&lt;/span&gt;)
      {
        &lt;span style="color: rgb(0,0,255)"&gt;throw&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;new&lt;/span&gt; &lt;span style="color: rgb(43,145,175)"&gt;ArgumentNullException&lt;/span&gt;(&lt;span style="color: rgb(163,21,21)"&gt;"dataType"&lt;/span&gt;);
      }
      &lt;/font&gt;&lt;font size="1"&gt;&lt;span style="color: rgb(0,128,0)"&gt;// The base component name is the Type name with the first character lower case
&lt;/span&gt;      &lt;span style="color: rgb(43,145,175)"&gt;String&lt;/span&gt; name &lt;span style="color: rgb(128,128,0)"&gt;=&lt;/span&gt; &lt;span style="color: rgb(43,145,175)"&gt;Char&lt;/span&gt;&lt;span style="color: rgb(128,128,0)"&gt;.&lt;/span&gt;ToLower(dataType&lt;span style="color: rgb(128,128,0)"&gt;.&lt;/span&gt;Name[&lt;span style="color: rgb(255,0,255)"&gt;0&lt;/span&gt;]) &lt;span style="color: rgb(128,128,0)"&gt;+&lt;/span&gt; dataType&lt;span style="color: rgb(128,128,0)"&gt;.&lt;/span&gt;Name&lt;span style="color: rgb(128,128,0)"&gt;.&lt;/span&gt;Substring(&lt;span style="color: rgb(255,0,255)"&gt;1&lt;/span&gt;);
      &lt;span style="color: rgb(0,0,255)"&gt;int&lt;/span&gt; number &lt;span style="color: rgb(128,128,0)"&gt;=&lt;/span&gt; &lt;span style="color: rgb(255,0,255)"&gt;1&lt;/span&gt;;
      &lt;/font&gt;&lt;font size="1"&gt;&lt;span style="color: rgb(0,128,0)"&gt;// If the container parameter is null, no container search is needed
&lt;/span&gt;      &lt;span style="color: rgb(0,0,255)"&gt;if&lt;/span&gt; (container &lt;span style="color: rgb(128,128,0)"&gt;!=&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;null&lt;/span&gt;)
      {
        &lt;/font&gt;&lt;font size="1"&gt;&lt;span style="color: rgb(0,128,0)"&gt;// Increment counter until we find a name that is not in use
&lt;/span&gt;        &lt;span style="color: rgb(0,0,255)"&gt;while&lt;/span&gt; (container&lt;span style="color: rgb(128,128,0)"&gt;.&lt;/span&gt;Components[name &lt;span style="color: rgb(128,128,0)"&gt;+&lt;/span&gt; number&lt;span style="color: rgb(128,128,0)"&gt;.&lt;/span&gt;ToString()] &lt;span style="color: rgb(128,128,0)"&gt;!=&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;null&lt;/span&gt;)
        {
          &lt;span style="color: rgb(128,128,0)"&gt;++&lt;/span&gt;number;
        }
      }
      &lt;span style="color: rgb(0,0,255)"&gt;return&lt;/span&gt; (name &lt;span style="color: rgb(128,128,0)"&gt;+&lt;/span&gt; number&lt;span style="color: rgb(128,128,0)"&gt;.&lt;/span&gt;ToString());
    }
&lt;/font&gt;&lt;/pre&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;p&gt;I also added implementations of &lt;a href="http://msdn2.microsoft.com/en-us/library/system.componentmodel.design.serialization.inamecreationservice.isvalidname.aspx"&gt;INameCreationService.IsValidName&lt;/a&gt; and &lt;a href="http://msdn2.microsoft.com/en-us/library/system.componentmodel.design.serialization.inamecreationservice.validatename.aspx"&gt;INameCreationService.ValidateName&lt;/a&gt;.  The &lt;a href="http://msdn2.microsoft.com/en-us/library/system.componentmodel.design.serialization.inamecreationservice.isvalidname.aspx"&gt;IsValidName&lt;/a&gt; method returns a Boolean and does not throw any exceptions.  The &lt;a href="http://msdn2.microsoft.com/en-us/library/system.componentmodel.design.serialization.inamecreationservice.validatename.aspx"&gt;ValidateName&lt;/a&gt; method can throw an exception to return the exact reason why the candidate name fails.  Generally, the code structure of the two methods should be similar, differing primarily in how they communicate an error back to the developer.&lt;/p&gt;&lt;pre class="code"&gt;&lt;font size="1"&gt;    &lt;span style="color: rgb(0,0,255)"&gt;bool&lt;/span&gt; &lt;span style="color: rgb(43,145,175)"&gt;INameCreationService&lt;/span&gt;&lt;span style="color: rgb(128,128,0)"&gt;.&lt;/span&gt;IsValidName(&lt;span style="color: rgb(43,145,175)"&gt;String&lt;/span&gt; name)
    {
      &lt;/font&gt;&lt;font size="1"&gt;&lt;span style="color: rgb(0,128,0)"&gt;// Cannot be null or empty
&lt;/span&gt;      &lt;span style="color: rgb(0,0,255)"&gt;if&lt;/span&gt; (&lt;span style="color: rgb(43,145,175)"&gt;String&lt;/span&gt;&lt;span style="color: rgb(128,128,0)"&gt;.&lt;/span&gt;IsNullOrEmpty(name))
      {
        &lt;span style="color: rgb(0,0,255)"&gt;return&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;false&lt;/span&gt;;
      }
      &lt;/font&gt;&lt;font size="1"&gt;&lt;span style="color: rgb(0,128,0)"&gt;// Cannot start with a number
&lt;/span&gt;      &lt;span style="color: rgb(43,145,175)"&gt;UnicodeCategory&lt;/span&gt; uc &lt;span style="color: rgb(128,128,0)"&gt;=&lt;/span&gt; &lt;span style="color: rgb(43,145,175)"&gt;Char&lt;/span&gt;&lt;span style="color: rgb(128,128,0)"&gt;.&lt;/span&gt;GetUnicodeCategory(name, &lt;span style="color: rgb(255,0,255)"&gt;0&lt;/span&gt;);
      &lt;span style="color: rgb(0,0,255)"&gt;if&lt;/span&gt; (uc &lt;span style="color: rgb(128,128,0)"&gt;==&lt;/span&gt; &lt;span style="color: rgb(43,145,175)"&gt;UnicodeCategory&lt;/span&gt;&lt;span style="color: rgb(128,128,0)"&gt;.&lt;/span&gt;DecimalDigitNumber)
      {
        &lt;span style="color: rgb(0,0,255)"&gt;return&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;false&lt;/span&gt;;
      }
      &lt;/font&gt;&lt;font size="1"&gt;&lt;span style="color: rgb(0,128,0)"&gt;// Cannot have anything other than letters and numbers
&lt;/span&gt;      &lt;span style="color: rgb(0,0,255)"&gt;foreach&lt;/span&gt; (&lt;span style="color: rgb(43,145,175)"&gt;Char&lt;/span&gt; c &lt;span style="color: rgb(0,0,255)"&gt;in&lt;/span&gt; name)
      {
        uc &lt;span style="color: rgb(128,128,0)"&gt;=&lt;/span&gt; &lt;span style="color: rgb(43,145,175)"&gt;Char&lt;/span&gt;&lt;span style="color: rgb(128,128,0)"&gt;.&lt;/span&gt;GetUnicodeCategory(c);
        &lt;span style="color: rgb(0,0,255)"&gt;switch&lt;/span&gt; (uc)
        {
          &lt;span style="color: rgb(0,0,255)"&gt;case&lt;/span&gt; &lt;span style="color: rgb(43,145,175)"&gt;UnicodeCategory&lt;/span&gt;&lt;span style="color: rgb(128,128,0)"&gt;.&lt;/span&gt;UppercaseLetter:
          &lt;span style="color: rgb(0,0,255)"&gt;case&lt;/span&gt; &lt;span style="color: rgb(43,145,175)"&gt;UnicodeCategory&lt;/span&gt;&lt;span style="color: rgb(128,128,0)"&gt;.&lt;/span&gt;LowercaseLetter:
          &lt;span style="color: rgb(0,0,255)"&gt;case&lt;/span&gt; &lt;span style="color: rgb(43,145,175)"&gt;UnicodeCategory&lt;/span&gt;&lt;span style="color: rgb(128,128,0)"&gt;.&lt;/span&gt;TitlecaseLetter:
          &lt;span style="color: rgb(0,0,255)"&gt;case&lt;/span&gt; &lt;span style="color: rgb(43,145,175)"&gt;UnicodeCategory&lt;/span&gt;&lt;span style="color: rgb(128,128,0)"&gt;.&lt;/span&gt;DecimalDigitNumber:
            &lt;span style="color: rgb(0,0,255)"&gt;break&lt;/span&gt;;
          &lt;span style="color: rgb(0,0,255)"&gt;default&lt;/span&gt;:
            &lt;span style="color: rgb(0,0,255)"&gt;return&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;false&lt;/span&gt;;
        }
      }
      &lt;span style="color: rgb(0,0,255)"&gt;return&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;true&lt;/span&gt;;
    }
&lt;/font&gt;&lt;/pre&gt;&lt;pre class="code"&gt;&lt;font size="1"&gt;    &lt;span style="color: rgb(0,0,255)"&gt;void&lt;/span&gt; &lt;span style="color: rgb(43,145,175)"&gt;INameCreationService&lt;/span&gt;&lt;span style="color: rgb(128,128,0)"&gt;.&lt;/span&gt;ValidateName(&lt;span style="color: rgb(43,145,175)"&gt;String&lt;/span&gt; name)
    {
      &lt;/font&gt;&lt;font size="1"&gt;&lt;span style="color: rgb(0,128,0)"&gt;// Cannot be null
&lt;/span&gt;      &lt;span style="color: rgb(0,0,255)"&gt;if&lt;/span&gt; (name &lt;span style="color: rgb(128,128,0)"&gt;==&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;null&lt;/span&gt;)
      {
        &lt;span style="color: rgb(0,0,255)"&gt;throw&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;new&lt;/span&gt; &lt;span style="color: rgb(43,145,175)"&gt;ArgumentNullException&lt;/span&gt;(&lt;span style="color: rgb(163,21,21)"&gt;"name"&lt;/span&gt;);
      }
      &lt;/font&gt;&lt;font size="1"&gt;&lt;span style="color: rgb(0,128,0)"&gt;// Cannot be empty
&lt;/span&gt;      &lt;span style="color: rgb(0,0,255)"&gt;if&lt;/span&gt; (name&lt;span style="color: rgb(128,128,0)"&gt;.&lt;/span&gt;Trim()&lt;span style="color: rgb(128,128,0)"&gt;.&lt;/span&gt;Length &lt;span style="color: rgb(128,128,0)"&gt;==&lt;/span&gt; &lt;span style="color: rgb(255,0,255)"&gt;0&lt;/span&gt;)
      {
        &lt;span style="color: rgb(0,0,255)"&gt;throw&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;new&lt;/span&gt; &lt;span style="color: rgb(43,145,175)"&gt;ArgumentException&lt;/span&gt;(&lt;span style="color: rgb(163,21,21)"&gt;"name cannot be of zero length"&lt;/span&gt;);
      }
      &lt;/font&gt;&lt;font size="1"&gt;&lt;span style="color: rgb(0,128,0)"&gt;// Cannot start with a number
&lt;/span&gt;      &lt;span style="color: rgb(43,145,175)"&gt;UnicodeCategory&lt;/span&gt; uc &lt;span style="color: rgb(128,128,0)"&gt;=&lt;/span&gt; &lt;span style="color: rgb(43,145,175)"&gt;Char&lt;/span&gt;&lt;span style="color: rgb(128,128,0)"&gt;.&lt;/span&gt;GetUnicodeCategory(name, &lt;span style="color: rgb(255,0,255)"&gt;0&lt;/span&gt;);
      &lt;span style="color: rgb(0,0,255)"&gt;if&lt;/span&gt; (uc &lt;span style="color: rgb(128,128,0)"&gt;==&lt;/span&gt; &lt;span style="color: rgb(43,145,175)"&gt;UnicodeCategory&lt;/span&gt;&lt;span style="color: rgb(128,128,0)"&gt;.&lt;/span&gt;DecimalDigitNumber)
      {
        &lt;span style="color: rgb(0,0,255)"&gt;throw&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;new&lt;/span&gt; &lt;span style="color: rgb(43,145,175)"&gt;ArgumentException&lt;/span&gt;(&lt;span style="color: rgb(163,21,21)"&gt;"name cannot start with a number"&lt;/span&gt;);
      }
      &lt;/font&gt;&lt;font size="1"&gt;&lt;span style="color: rgb(0,128,0)"&gt;// Cannot have anything other than letters and numbers
&lt;/span&gt;      &lt;span style="color: rgb(0,0,255)"&gt;foreach&lt;/span&gt; (&lt;span style="color: rgb(43,145,175)"&gt;Char&lt;/span&gt; c &lt;span style="color: rgb(0,0,255)"&gt;in&lt;/span&gt; name)
      {
        uc &lt;span style="color: rgb(128,128,0)"&gt;=&lt;/span&gt; &lt;span style="color: rgb(43,145,175)"&gt;Char&lt;/span&gt;&lt;span style="color: rgb(128,128,0)"&gt;.&lt;/span&gt;GetUnicodeCategory(c);
        &lt;span style="color: rgb(0,0,255)"&gt;switch&lt;/span&gt; (uc)
        {
          &lt;span style="color: rgb(0,0,255)"&gt;case&lt;/span&gt; &lt;span style="color: rgb(43,145,175)"&gt;UnicodeCategory&lt;/span&gt;&lt;span style="color: rgb(128,128,0)"&gt;.&lt;/span&gt;UppercaseLetter:
          &lt;span style="color: rgb(0,0,255)"&gt;case&lt;/span&gt; &lt;span style="color: rgb(43,145,175)"&gt;UnicodeCategory&lt;/span&gt;&lt;span style="color: rgb(128,128,0)"&gt;.&lt;/span&gt;LowercaseLetter:
          &lt;span style="color: rgb(0,0,255)"&gt;case&lt;/span&gt; &lt;span style="color: rgb(43,145,175)"&gt;UnicodeCategory&lt;/span&gt;&lt;span style="color: rgb(128,128,0)"&gt;.&lt;/span&gt;TitlecaseLetter:
          &lt;span style="color: rgb(0,0,255)"&gt;case&lt;/span&gt; &lt;span style="color: rgb(43,145,175)"&gt;UnicodeCategory&lt;/span&gt;&lt;span style="color: rgb(128,128,0)"&gt;.&lt;/span&gt;DecimalDigitNumber:
            &lt;span style="color: rgb(0,0,255)"&gt;break&lt;/span&gt;;
          &lt;span style="color: rgb(0,0,255)"&gt;default&lt;/span&gt;:
            &lt;span style="color: rgb(0,0,255)"&gt;throw&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;new&lt;/span&gt; &lt;span style="color: rgb(43,145,175)"&gt;ArgumentException&lt;/span&gt;(&lt;span style="color: rgb(163,21,21)"&gt;"name must contain only letters and numbers"&lt;/span&gt;);
        }
      }
      &lt;span style="color: rgb(0,0,255)"&gt;return&lt;/span&gt;;
    }
&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;While there is a little more refactoring possible, that will be good enough for now.&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=116143"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=116143" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/mtreadwell/aggbug/116143.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Mark Treadwell</dc:creator>
            <guid>http://geekswithblogs.net/mtreadwell/archive/2007/10/18/116143.aspx</guid>
            <pubDate>Thu, 18 Oct 2007 22:12:15 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/mtreadwell/comments/116143.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/mtreadwell/archive/2007/10/18/116143.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/mtreadwell/comments/commentRss/116143.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/mtreadwell/services/trackbacks/116143.aspx</trackback:ping>
        </item>
        <item>
            <title>Custom Forms Designer: A Restart</title>
            <link>http://geekswithblogs.net/mtreadwell/archive/2007/10/17/116107.aspx</link>
            <description>&lt;p&gt;Reminder: All posts in this series can be found &lt;a title="Custom Forms Designer Series" href="http://geekswithblogs.net/mtreadwell/category/7229.aspx"&gt;here&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;Some time ago, I started work on hosting the Windows Forms design surface in a project.  Since that was nearly three years ago, I believe it was in the early .NET 2.0 days.  My priorities got redirected and the project languished.  A new project is clearly targeted at achieving the same goal, so I am back to building a solid implementation to get a beta front end out the door.&lt;/p&gt; &lt;p&gt;Those old posts are still of good use to remind me of everything I have forgotten in the interim:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="http://geekswithblogs.net/mtreadwell/archive/2004/11/23/15763.aspx"&gt;Implementing a Custom Forms Designer in .NET&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;&lt;a href="http://geekswithblogs.net/mtreadwell/archive/2005/01/06/19342.aspx"&gt;.NET Custom Forms Designer: The Goal&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;&lt;a href="http://geekswithblogs.net/mtreadwell/archive/2005/01/06/19343.aspx"&gt;.NET Custom Forms Designer: Classes and Interfaces&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;&lt;a href="http://geekswithblogs.net/mtreadwell/archive/2005/01/11/19745.aspx"&gt;.NET Custom Forms Designer: Framework 2.0&lt;/a&gt; &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;Microsoft has subsequently posted a much more complete MSDN Magazine sample:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="http://msdn.microsoft.com/msdnmag/issues/06/03/DesignerHosting/"&gt;The Perfect Host: Create And Host Custom Designers With The .NET Framework 2.0&lt;/a&gt; (download &lt;a href="http://download.microsoft.com/download/f/2/7/f279e71e-efb0-4155-873d-5554a0608523/DesignerHosting.exe"&gt;code&lt;/a&gt;) &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;I am using this sample as the basis for a new project which has a Windows Forms design surface at its heart.  The main application will control the execution of a suite of 30 or so training applications in a standalone network.  The instructor will be able to control everything from a central computer, remote boot the computers, group the computers together into teams/rooms, remote start individual applications on the computers, assign the teams to specific training exercises, monitor the status of the exercises, and remote stop the applications, and remote shut down the computers.&lt;/p&gt; &lt;p&gt;The use of the Windows Forms design surface will allow me to use custom Windows controls to represent the computers, groups, and rooms.  This removes a significant amount of the complexity from the application.  The tradeoff is the implementation of the Windows Forms design surface details are nontrivial, but not too difficult.&lt;/p&gt; &lt;p&gt;The first thing I did with the sample was to customize the code to my layout tastes (Ctrl+E, D), deleting and adding blank lines as I scanned through the files.  Recompile.  Change the namespaces to fit our development scheme.  Recompile after each.  Extract extra types where there was more than one in a file, again to match our standards.  Recompile.  Change the executable names and compile locations.  Recompile.  Add our assembly attributes.  Recompile.  Clean up the using statements at the top of the code files.  Recompile.&lt;/p&gt; &lt;p&gt;OK.  Now I feel like I can do some coding.&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=116107"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=116107" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/mtreadwell/aggbug/116107.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Mark Treadwell</dc:creator>
            <guid>http://geekswithblogs.net/mtreadwell/archive/2007/10/17/116107.aspx</guid>
            <pubDate>Thu, 18 Oct 2007 01:02:32 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/mtreadwell/comments/116107.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/mtreadwell/archive/2007/10/17/116107.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/mtreadwell/comments/commentRss/116107.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/mtreadwell/services/trackbacks/116107.aspx</trackback:ping>
        </item>
        <item>
            <title>Tafiti Search</title>
            <link>http://geekswithblogs.net/mtreadwell/archive/2007/09/21/115494.aspx</link>
            <description>&lt;p&gt;Microsoft &lt;a href="http://blogs.msdn.com/somasegar/archive/2007/09/20/halo-themed-version-of-tafiti.aspx"&gt;announced&lt;/a&gt; the availability of a new &lt;a href="http://www.tafiti.com/"&gt;Tafiti&lt;/a&gt; experimental search front-end based on Silverlight.  I tried out the Halo 3 branded system, and it is visually very nice and functionally very smooth.&lt;/p&gt; &lt;p&gt;However, as a search engine front-end, it is currently a failure.  I sent the team the following feedback:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;Sorry guys, but I have to grade it as a complete failure. &lt;/p&gt;&lt;p&gt;1) You completely fail to operate under a common setting (popup blocker set at medium) in your own browser (IE7) &lt;/p&gt;&lt;p&gt;2) You cannot bypass #1 using a Ctrl-Click &lt;/p&gt;&lt;p&gt;While it looks spiffy, it is useless.&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;They need to test more usage scenarios.&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=115494"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=115494" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/mtreadwell/aggbug/115494.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Mark Treadwell</dc:creator>
            <guid>http://geekswithblogs.net/mtreadwell/archive/2007/09/21/115494.aspx</guid>
            <pubDate>Fri, 21 Sep 2007 15:02:16 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/mtreadwell/comments/115494.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/mtreadwell/archive/2007/09/21/115494.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/mtreadwell/comments/commentRss/115494.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/mtreadwell/services/trackbacks/115494.aspx</trackback:ping>
        </item>
        <item>
            <title>More About a Generic Range Class</title>
            <link>http://geekswithblogs.net/mtreadwell/archive/2007/06/02/More-About-a-Generic-Range-Class.aspx</link>
            <description>&lt;div class="wlWriterSmartContent" id="0767317B-992E-4b12-91E0-4F059A8CECA8:74ab9012-b4d5-4ac8-9e60-d2f8efea8973" contenteditable="false" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/generic%20range%20class" rel="tag"&gt;generic range class&lt;/a&gt;, &lt;a href="http://technorati.com/tags/C#" rel="tag"&gt;C#&lt;/a&gt;&lt;/div&gt; &lt;p&gt;First there was &lt;a href="http://blogs.msdn.com/jaybaz_ms"&gt;Jay Bazuzi&lt;/a&gt; and his &lt;a href="http://blogs.msdn.com/jaybaz_ms/archive/2004/08/19/217226.aspx"&gt;article&lt;/a&gt; and &lt;a href="http://blogs.msdn.com/jaybaz_ms/archive/2004/08/20/217789.aspx"&gt;follow-up&lt;/a&gt; with a simple &lt;code&gt;Range&lt;/code&gt; class.  I referred to those postings when I did a &lt;a href="http://geekswithblogs.net/mtreadwell/archive/2006/05/16/78639.aspx"&gt;generic range class&lt;/a&gt; for a project I had.  Now Sean Hederman has posted a &lt;a href="http://www.codeproject.com/"&gt;CodeProject&lt;/a&gt; article with his &lt;a href="http://www.codeproject.com/useritems/buildingrange.asp"&gt;generic range class&lt;/a&gt;.  Very nice!&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=112937"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=112937" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/mtreadwell/aggbug/112937.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Mark Treadwell</dc:creator>
            <guid>http://geekswithblogs.net/mtreadwell/archive/2007/06/02/More-About-a-Generic-Range-Class.aspx</guid>
            <pubDate>Sat, 02 Jun 2007 18:41:57 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/mtreadwell/comments/112937.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/mtreadwell/archive/2007/06/02/More-About-a-Generic-Range-Class.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/mtreadwell/comments/commentRss/112937.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/mtreadwell/services/trackbacks/112937.aspx</trackback:ping>
        </item>
        <item>
            <title>.NET Naming Debacle - 2</title>
            <link>http://geekswithblogs.net/mtreadwell/archive/2006/12/03/100256.aspx</link>
            <description>&lt;P&gt;Almost five months ago, &lt;A href="http://geekswithblogs.net/mtreadwell/archive/2006/06/11/81478.aspx"&gt;I wrote&lt;/A&gt; that "Microsoft screwed up big for customer confusion" with the whole .NET 3.0 naming thing.&amp;nbsp; I got a few defensive comments about how the whole effort was great.&amp;nbsp; Well, let's see.&amp;nbsp; Today I read a &lt;A href="http://blogs.msdn.com/mohammadakif/archive/2006/12/03/net-3-0-different-versions-of-the-net-framework.aspx"&gt;post&lt;/A&gt; from a member of the Microsoft Architecture Editorial Board (whatever that exactly is).&amp;nbsp; You know it is not going well when the post starts out with, "There has been considerable confusion about the differences between various versions of the .NET framework."&lt;/P&gt;
&lt;P&gt;My point exactly.&amp;nbsp; It was an implied contract that (.NET Version) == (CLR Version).&amp;nbsp; Now that they broke that implied contract&amp;nbsp;and completely screwed up the explanations, they have mea culpa posts continuing to flow, even after five months have passed.&amp;nbsp; It is difficult to explain yourself out of a marketing ploy that is counter intuitive.&lt;/P&gt;
&lt;P&gt;Want more pretzel logic?&amp;nbsp; Check &lt;A href="http://www.flickr.com/photos/75251211@N00/313250406/"&gt;this&lt;/A&gt; out.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.flickr.com/photos/75251211@N00/313250406/"&gt;&lt;IMG height=302 alt=".NET Framework 1.0 through 3.5" src="http://static.flickr.com/105/313250406_95e337660b.jpg" width=450&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Yes, the current plan is to keep CLR 2.0 for a long time and just keep gluing on additional bits.&amp;nbsp; Will we be ending up with .NET 3.5 based on CLR 2.0 and be using C# 3.0? &amp;nbsp;Kinda looks like it.&amp;nbsp; Great ready for the Java versioning disaster to arrive in a .NET Framework near you soon!&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Addendum&lt;/STRONG&gt;: My take is that "Fx 3.0" should have been Version 2.1.&amp;nbsp; "Fx 3.5" should be Version 2.2 (or 2.5 at best).&amp;nbsp; Microsoft has dumped the minor versions of most everything and is stuck with must-major-version-everything-itis.&lt;/P&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=100256"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=100256" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/mtreadwell/aggbug/100256.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Mark Treadwell</dc:creator>
            <guid>http://geekswithblogs.net/mtreadwell/archive/2006/12/03/100256.aspx</guid>
            <pubDate>Mon, 04 Dec 2006 00:23:00 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/mtreadwell/comments/100256.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/mtreadwell/archive/2006/12/03/100256.aspx#feedback</comments>
            <slash:comments>4</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/mtreadwell/comments/commentRss/100256.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/mtreadwell/services/trackbacks/100256.aspx</trackback:ping>
        </item>
        <item>
            <title>Windows PowerShell Jump Start</title>
            <link>http://geekswithblogs.net/mtreadwell/archive/2006/11/30/99809.aspx</link>
            <description>There are several friendly pages to help you get going.&amp;nbsp; Assuming you are starting with VBScript, Microsoft has a &lt;A href="http://www.microsoft.com/technet/scriptcenter/topics/winpsh/convert/default.mspx"&gt;Converting VBScript Commands to Windows PowerShell Commands&lt;/A&gt;&amp;nbsp;page which will be your friend as you explore.&amp;nbsp; Learn from their &lt;A href="http://www.microsoft.com/technet/scriptcenter/topics/msh/cmdlets/index.mspx"&gt;Task-Based Guide to Windows PowerShell Cmdlets&lt;/A&gt;.&amp;nbsp; Get working examples from the &lt;A href="http://www.microsoft.com/technet/scriptcenter/scripts/msh/default.mspx?mfr=true"&gt;Script Center Script Repository&lt;/A&gt;, and do not forget the &lt;A href="http://www.microsoft.com/technet/scriptcenter/createit.mspx"&gt;Tools and Utilities&lt;/A&gt;.&amp;nbsp; Download the latest version &lt;A href="http://www.microsoft.com/technet/scriptcenter/topics/msh/download.mspx"&gt;here&lt;/A&gt;.&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=99809"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=99809" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/mtreadwell/aggbug/99809.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Mark Treadwell</dc:creator>
            <guid>http://geekswithblogs.net/mtreadwell/archive/2006/11/30/99809.aspx</guid>
            <pubDate>Thu, 30 Nov 2006 10:45:00 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/mtreadwell/comments/99809.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/mtreadwell/archive/2006/11/30/99809.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/mtreadwell/comments/commentRss/99809.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/mtreadwell/services/trackbacks/99809.aspx</trackback:ping>
        </item>
        <item>
            <title>Google Code Search - Finding Hidden Evils</title>
            <link>http://geekswithblogs.net/mtreadwell/archive/2006/10/11/93812.aspx</link>
            <description>&lt;P&gt;It is sometimes amazing what those crazy programmers &lt;A href="http://www.google.com/codesearch?as_q=microsoft+sucks&amp;amp;btnG=Search+Code&amp;amp;as_lang=java&amp;amp;as_license_restrict=i&amp;amp;as_license=&amp;amp;as_package=&amp;amp;as_filename=&amp;amp;as_case="&gt;put&lt;/A&gt; &lt;A href="http://www.google.com/codesearch?as_q=ie+sucks&amp;amp;btnG=Search+Code&amp;amp;as_lang=java&amp;amp;as_license_restrict=i&amp;amp;as_license=&amp;amp;as_package=&amp;amp;as_filename=&amp;amp;as_case="&gt;in&lt;/A&gt; &lt;A href="http://www.google.com/codesearch?as_q=java+sucks&amp;amp;btnG=Search+Code&amp;amp;as_lang=java&amp;amp;as_license_restrict=i&amp;amp;as_license=&amp;amp;as_package=&amp;amp;as_filename=&amp;amp;as_case="&gt;their&lt;/A&gt; &lt;A href="http://www.google.com/codesearch?as_q=fucked+up&amp;amp;btnG=Search+Code&amp;amp;as_lang=java&amp;amp;as_license_restrict=i&amp;amp;as_license=&amp;amp;as_package=&amp;amp;as_filename=&amp;amp;as_case="&gt;comments&lt;/A&gt;!&lt;/P&gt;
&lt;P&gt;Bad programmers!&amp;nbsp; Bad!&amp;nbsp; I personally try to not use &amp;#8220;Hard K&amp;#8221; words.&amp;nbsp; Again &lt;A href="http://slashdot.org/article.pl?sid=06/10/11/024250"&gt;/. is on it&lt;/A&gt;.&lt;/P&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=93812"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=93812" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/mtreadwell/aggbug/93812.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Mark Treadwell</dc:creator>
            <guid>http://geekswithblogs.net/mtreadwell/archive/2006/10/11/93812.aspx</guid>
            <pubDate>Wed, 11 Oct 2006 19:50:00 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/mtreadwell/comments/93812.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/mtreadwell/archive/2006/10/11/93812.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/mtreadwell/comments/commentRss/93812.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/mtreadwell/services/trackbacks/93812.aspx</trackback:ping>
        </item>
        <item>
            <title>Google Code Search - Use and Misuse</title>
            <link>http://geekswithblogs.net/mtreadwell/archive/2006/10/08/93494.aspx</link>
            <description>&lt;P&gt;I have been playing around with this new (test) feature and have a few more comments.&lt;/P&gt;
&lt;P&gt;First, it is irritating that it does not yet respect your search customizations.&amp;nbsp; I like 100 results per page, but Code Search puts up 10 whether you want it or not.&lt;/P&gt;
&lt;P&gt;Second, it is evident that quite a bit more of the published source code from books is now easily findable.&amp;nbsp; The publishers switched from floppies to CD-ROM and later&amp;nbsp;removed CD-ROMs from books to cut costs.&amp;nbsp; They probably did not think their book code would be reachable this easily.&lt;/P&gt;
&lt;P&gt;Third, there is quite a bit of application sample code that shows the default connection strings for databases.&amp;nbsp; For example, &lt;A href="http://www.google.com/codesearch?q=+lang:c%23+password&amp;amp;start=80&amp;amp;sa=N"&gt;this&lt;/A&gt; search page for &amp;#8220;password&amp;#8221;&amp;nbsp;gives you the default data for an Oracle login with the helpful comment &amp;#8220;a base string is created and options are added&amp;nbsp; this uses the hr schema with the default password make sure to adjust this for your environment.&amp;#8221;&amp;nbsp; &lt;A href="http://it.slashdot.org/article.pl?sid=06/10/08/1243235"&gt;/. is on it&lt;/A&gt;.&lt;/P&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=93494"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=93494" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/mtreadwell/aggbug/93494.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Mark Treadwell</dc:creator>
            <guid>http://geekswithblogs.net/mtreadwell/archive/2006/10/08/93494.aspx</guid>
            <pubDate>Sun, 08 Oct 2006 12:18:00 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/mtreadwell/comments/93494.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/mtreadwell/archive/2006/10/08/93494.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/mtreadwell/comments/commentRss/93494.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/mtreadwell/services/trackbacks/93494.aspx</trackback:ping>
        </item>
    </channel>
</rss>