<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://www.objectsharp.com/cs/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"><title type="html">Dan's  Blog</title><subtitle type="html">Junior's Thoughts on all Things .NET</subtitle><id>http://www.objectsharp.com/cs/blogs/dan/atom.aspx</id><link rel="alternate" type="text/html" href="http://www.objectsharp.com/cs/blogs/dan/default.aspx" /><link rel="self" type="application/atom+xml" href="http://www.objectsharp.com/cs/blogs/dan/atom.aspx" /><generator uri="http://communityserver.org" version="2.1.61129.2">Community Server</generator><updated>2004-06-10T11:26:00Z</updated><entry><title>SQL Server – Dropped my default database</title><link rel="alternate" type="text/html" href="http://www.objectsharp.com/cs/blogs/dan/archive/2008/07/18/sql-server-dropped-my-default-database.aspx" /><id>http://www.objectsharp.com/cs/blogs/dan/archive/2008/07/18/sql-server-dropped-my-default-database.aspx</id><published>2008-07-18T20:14:38Z</published><updated>2008-07-18T20:14:38Z</updated><content type="html">&lt;p&gt;&lt;/p&gt; &lt;p&gt;Today I learned an important lesson about Sql Server 2005, don’t change your default database unless you absolutely have to.&amp;nbsp; I set mine to DatabaseX and then I promptly dropped DatabaseX.&amp;nbsp; When I tried to log in I got a nice error message &lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Cannot Open User Default Database, Login Failed&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;I didn’t setup the VM that I was using, so I didn’t know the SA password.&amp;nbsp; I basically had no way to get back into the server.&amp;nbsp; So if you ever find yourself in this predicament, execute the following from the command line:&lt;/p&gt;&lt;pre&gt;C:\&amp;gt; sqlcmd -E -d master 
1&amp;gt; ALTER LOGIN [&lt;em&gt;YOUR &lt;/em&gt;&lt;em&gt;USER&lt;/em&gt;&lt;em&gt; NAME HERE&lt;/em&gt;] WITH DEFAULT_DATABASE=master 
2&amp;gt; GO&lt;/pre&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;
&lt;p&gt;That will reset your default database back to master and you can login again.&amp;nbsp; &lt;/p&gt;&lt;img src="http://www.objectsharp.com/cs/aggbug.aspx?PostID=149134" width="1" height="1"&gt;</content><author><name>dan</name><uri>http://www.objectsharp.com/cs/members/dan.aspx</uri></author></entry><entry><title>Infragistics Tips and Tricks - Part 1 of N</title><link rel="alternate" type="text/html" href="http://www.objectsharp.com/cs/blogs/dan/archive/2008/03/31/infragistics-tips-and-tricks-part-1-of-n.aspx" /><id>http://www.objectsharp.com/cs/blogs/dan/archive/2008/03/31/infragistics-tips-and-tricks-part-1-of-n.aspx</id><published>2008-03-31T12:52:47Z</published><updated>2008-03-31T12:52:47Z</updated><content type="html">&lt;p&gt;The current project I'm on is using Infragistics controls exclusively.&amp;#160; Infragistics can do some wonderful things, but damn, sometimes it does it horribly.&amp;#160; So here are a couple little hints and tips that might save someone a couple of frustrating moments of despair.&amp;#160; Find something in my list that I did wrong?&amp;#160; Found something I could have done better / cleaner / quicker? Please let me know.&lt;/p&gt;  &lt;h4&gt;Binding to a List&amp;lt;&amp;gt;&lt;/h4&gt;  &lt;p&gt;If you are binding your Grid to a BindingSource that in turn is bound to a Generic List, the key of your band needs to be the name of the class your list contains.&lt;/p&gt;  &lt;pre&gt;List&amp;lt;Message&amp;gt; myList = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; List&amp;lt;Message&amp;gt;();
myBindingSource.DataSource = myList;
myUltraGrid.DataSource = myBindingSource;&lt;/pre&gt;

&lt;pre&gt;&amp;#160;&lt;/pre&gt;

&lt;p&gt;Band key in your schema is 'Message'.&amp;#160; If your class contains another collection there will be bands for those collections which will add 'plus' signs beside all your rows even if that collection is empty.&amp;#160; Create another band in your schema with a key equal to your child collection and then set Hidden = true.&amp;#160; (See below about the Hidden property...)&lt;/p&gt;

&lt;p&gt;The other note for binding to a generic list is that if it isn't an ObservableCollection or BindingList&amp;#160; (or anything that doesn't implement IBindingList or IBindingListVIew) then you are not going to get an update when you add or remove and item from the list.&amp;#160; If you know these things are happening you can call myBindingsource.ResetBindings(false) when they happen to update your grid with the new bindings.&lt;/p&gt;

&lt;p&gt;&lt;a title="http://blogs.msdn.com/dchandnani/archive/2005/03/15/396387.aspx" href="http://blogs.msdn.com/dchandnani/archive/2005/03/15/396387.aspx" target="_blank"&gt;Good article&lt;/a&gt; on what interfaces have what binding functionality.&lt;/p&gt;

&lt;h4&gt;Can't Find the .Visible property? &lt;/h4&gt;

&lt;p&gt;This one baffles me, and I'd love to know why some infragistics controls do not have a .Visible property, instead they have a .Hidden.&amp;#160; Watch out for that.&amp;#160; Apparently this is some sort of VB throw back blah blah blah.&lt;/p&gt;

&lt;h4&gt;CreationFilter's To Change GroupBy Headers&lt;/h4&gt;

&lt;p&gt;&lt;a href="http://devcenter.infragistics.com/Support/KnowledgeBaseArticle.Aspx?ArticleID=5510" target="_blank"&gt;CreationFilters&lt;/a&gt; are a really cool concept that let you change the layout of a lot of Infragistic controls and add new functionality.&amp;#160; I used this to add some status lights to the GroupByRows of my grid.&amp;#160; &lt;/p&gt;

&lt;p&gt;Create a Creation Filter class that implements IUIElementCreationFilter.&amp;#160; My AfterCreateChildElements(UIElement parent) does nothing but here is my&amp;#160; BeforeCreateChildElements method.&amp;#160; This will create 3 icons and some text in the group by row.&amp;#160; I create my own text element but if you want to grab the existing text element:&amp;#160; &lt;/p&gt;

&lt;div class="wlWriterSmartContent" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:2d02c8e1-a21a-40e2-b067-63332d47c413" style="padding-right:0px;display:inline;padding-left:0px;float:none;padding-bottom:0px;margin:0px;width:666px;padding-top:0px;"&gt;&lt;pre style="background-color:White;overflow:auto;"&gt;&lt;div&gt;&lt;span style="color:#000000;"&gt;DependentTextUIElement dependentTextUIElement &lt;/span&gt;&lt;span style="color:#000000;"&gt;=&lt;/span&gt;&lt;span style="color:#000000;"&gt;
       parent.GetDescendant(&lt;/span&gt;&lt;span style="color:#0000FF;"&gt;typeof&lt;/span&gt;&lt;span style="color:#000000;"&gt;(DependentTextUIElement)) &lt;/span&gt;&lt;span style="color:#0000FF;"&gt;as&lt;/span&gt;&lt;span style="color:#000000;"&gt; DependentTextUIElement;

&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&lt;/p&gt;

&lt;pre&gt;&amp;#160;&lt;/pre&gt;

&lt;pre&gt;&lt;div class="wlWriterSmartContent" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:961e9140-904d-4dba-a95a-c995fd4bc0d9" style="padding-right:0px;display:inline;padding-left:0px;float:none;padding-bottom:0px;margin:0px;width:688px;padding-top:0px;"&gt;&lt;pre style="background-color:White;overflow:auto;"&gt;&lt;div&gt;&lt;span style="color:#0000FF;"&gt;public&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#0000FF;"&gt;bool&lt;/span&gt;&lt;span style="color:#000000;"&gt; BeforeCreateChildElements(UIElement parent)
{
    &lt;/span&gt;&lt;span style="color:#0000FF;"&gt;bool&lt;/span&gt;&lt;span style="color:#000000;"&gt; value &lt;/span&gt;&lt;span style="color:#000000;"&gt;=&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#0000FF;"&gt;false&lt;/span&gt;&lt;span style="color:#000000;"&gt;;
    &lt;/span&gt;&lt;span style="color:#0000FF;"&gt;if&lt;/span&gt;&lt;span style="color:#000000;"&gt; (parent &lt;/span&gt;&lt;span style="color:#0000FF;"&gt;is&lt;/span&gt;&lt;span style="color:#000000;"&gt; GroupByRowDescriptionUIElement)
    {
        &lt;/span&gt;&lt;span style="color:#0000FF;"&gt;int&lt;/span&gt;&lt;span style="color:#000000;"&gt; X &lt;/span&gt;&lt;span style="color:#000000;"&gt;=&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#800080;"&gt;17&lt;/span&gt;&lt;span style="color:#000000;"&gt;;
        &lt;/span&gt;&lt;span style="color:#0000FF;"&gt;int&lt;/span&gt;&lt;span style="color:#000000;"&gt; Y &lt;/span&gt;&lt;span style="color:#000000;"&gt;=&lt;/span&gt;&lt;span style="color:#000000;"&gt; parent.Rect.Y &lt;/span&gt;&lt;span style="color:#000000;"&gt;+&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#800080;"&gt;1&lt;/span&gt;&lt;span style="color:#000000;"&gt;;
        &lt;/span&gt;&lt;span style="color:#0000FF;"&gt;int&lt;/span&gt;&lt;span style="color:#000000;"&gt; Width &lt;/span&gt;&lt;span style="color:#000000;"&gt;=&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#800080;"&gt;516&lt;/span&gt;&lt;span style="color:#000000;"&gt;;
        &lt;/span&gt;&lt;span style="color:#0000FF;"&gt;int&lt;/span&gt;&lt;span style="color:#000000;"&gt; Height &lt;/span&gt;&lt;span style="color:#000000;"&gt;=&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#800080;"&gt;17&lt;/span&gt;&lt;span style="color:#000000;"&gt;;
        UltraGridGroupByRow groupByRow &lt;/span&gt;&lt;span style="color:#000000;"&gt;=&lt;/span&gt;&lt;span style="color:#000000;"&gt; (UltraGridGroupByRow)parent.GetAncestor(&lt;/span&gt;&lt;span style="color:#0000FF;"&gt;typeof&lt;/span&gt;&lt;span style="color:#000000;"&gt;(GroupByRowUIElement)).GetContext(&lt;/span&gt;&lt;span style="color:#0000FF;"&gt;typeof&lt;/span&gt;&lt;span style="color:#000000;"&gt;(UltraGridGroupByRow));
        DeviceStatusInfo deviceInfo &lt;/span&gt;&lt;span style="color:#000000;"&gt;=&lt;/span&gt;&lt;span style="color:#000000;"&gt; groupByRow.Tag &lt;/span&gt;&lt;span style="color:#0000FF;"&gt;as&lt;/span&gt;&lt;span style="color:#000000;"&gt; DeviceStatusInfo;

        &lt;/span&gt;&lt;span style="color:#0000FF;"&gt;if&lt;/span&gt;&lt;span style="color:#000000;"&gt; (deviceInfo &lt;/span&gt;&lt;span style="color:#000000;"&gt;==&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#0000FF;"&gt;null&lt;/span&gt;&lt;span style="color:#000000;"&gt;)
        {
            deviceInfo &lt;/span&gt;&lt;span style="color:#000000;"&gt;=&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#0000FF;"&gt;new&lt;/span&gt;&lt;span style="color:#000000;"&gt; DeviceStatusInfo(&lt;/span&gt;&lt;span style="color:#800000;"&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span style="color:#000000;"&gt;, DeviceState.Offline, DeviceOnlineState.NotOnline, &lt;/span&gt;&lt;span style="color:#800000;"&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span style="color:#000000;"&gt;, FoundationHelper.GetImage(&lt;/span&gt;&lt;span style="color:#0000FF;"&gt;typeof&lt;/span&gt;&lt;span style="color:#000000;"&gt;(&lt;/span&gt;&lt;span style="color:#0000FF;"&gt;string&lt;/span&gt;&lt;span style="color:#000000;"&gt;)));
            groupByRow.Tag &lt;/span&gt;&lt;span style="color:#000000;"&gt;=&lt;/span&gt;&lt;span style="color:#000000;"&gt; deviceInfo;
        }
        &lt;/span&gt;&lt;span style="color:#0000FF;"&gt;string&lt;/span&gt;&lt;span style="color:#000000;"&gt; text &lt;/span&gt;&lt;span style="color:#000000;"&gt;=&lt;/span&gt;&lt;span style="color:#000000;"&gt; deviceInfo.DeviceName;
        &lt;/span&gt;&lt;span style="color:#0000FF;"&gt;if&lt;/span&gt;&lt;span style="color:#000000;"&gt; (&lt;/span&gt;&lt;span style="color:#000000;"&gt;!&lt;/span&gt;&lt;span style="color:#0000FF;"&gt;string&lt;/span&gt;&lt;span style="color:#000000;"&gt;.IsNullOrEmpty(deviceInfo.DeviceCurrentOperationsText))
            text &lt;/span&gt;&lt;span style="color:#000000;"&gt;+=&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#800000;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color:#800000;"&gt; - &lt;/span&gt;&lt;span style="color:#800000;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#000000;"&gt;+&lt;/span&gt;&lt;span style="color:#000000;"&gt; deviceInfo.DeviceCurrentOperationsText;
        TextUIElement textElement;
        ImageUIElement firstIndicator;
        ImageUIElement secondIndicator;
        ImageUIElement deviceIcon;
        parent.ChildElements.Clear();
        deviceIcon &lt;/span&gt;&lt;span style="color:#000000;"&gt;=&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#0000FF;"&gt;new&lt;/span&gt;&lt;span style="color:#000000;"&gt; ImageUIElement(parent, deviceInfo.DeviceImage);
        textElement &lt;/span&gt;&lt;span style="color:#000000;"&gt;=&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#0000FF;"&gt;new&lt;/span&gt;&lt;span style="color:#000000;"&gt; TextUIElement(parent, text);
        firstIndicator &lt;/span&gt;&lt;span style="color:#000000;"&gt;=&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#0000FF;"&gt;new&lt;/span&gt;&lt;span style="color:#000000;"&gt; ImageUIElement(parent, deviceInfo.DeviceStatusImage);
        secondIndicator &lt;/span&gt;&lt;span style="color:#000000;"&gt;=&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#0000FF;"&gt;new&lt;/span&gt;&lt;span style="color:#000000;"&gt; ImageUIElement(parent, deviceInfo.DeviceOnlineImage);
        deviceIcon.Rect &lt;/span&gt;&lt;span style="color:#000000;"&gt;=&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#0000FF;"&gt;new&lt;/span&gt;&lt;span style="color:#000000;"&gt; Rectangle(X, Y &lt;/span&gt;&lt;span style="color:#000000;"&gt;-&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#800080;"&gt;1&lt;/span&gt;&lt;span style="color:#000000;"&gt;, deviceInfo.DeviceImage.Width, deviceInfo.DeviceImage.Height);
        firstIndicator.Rect &lt;/span&gt;&lt;span style="color:#000000;"&gt;=&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#0000FF;"&gt;new&lt;/span&gt;&lt;span style="color:#000000;"&gt; Rectangle(deviceIcon.Rect.X &lt;/span&gt;&lt;span style="color:#000000;"&gt;+&lt;/span&gt;&lt;span style="color:#000000;"&gt; deviceIcon.Rect.Width &lt;/span&gt;&lt;span style="color:#000000;"&gt;+&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#800080;"&gt;2&lt;/span&gt;&lt;span style="color:#000000;"&gt;, Y, deviceInfo.DeviceStatusImage.Width, deviceInfo.DeviceStatusImage.Height);
        secondIndicator.Rect &lt;/span&gt;&lt;span style="color:#000000;"&gt;=&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#0000FF;"&gt;new&lt;/span&gt;&lt;span style="color:#000000;"&gt; Rectangle(firstIndicator.Rect.X &lt;/span&gt;&lt;span style="color:#000000;"&gt;+&lt;/span&gt;&lt;span style="color:#000000;"&gt; firstIndicator.Rect.Width &lt;/span&gt;&lt;span style="color:#000000;"&gt;+&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#800080;"&gt;2&lt;/span&gt;&lt;span style="color:#000000;"&gt;, Y, deviceInfo.DeviceOnlineImage.Width, deviceInfo.DeviceOnlineImage.Height);
        textElement.Rect &lt;/span&gt;&lt;span style="color:#000000;"&gt;=&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#0000FF;"&gt;new&lt;/span&gt;&lt;span style="color:#000000;"&gt; Rectangle(secondIndicator.Rect.X &lt;/span&gt;&lt;span style="color:#000000;"&gt;+&lt;/span&gt;&lt;span style="color:#000000;"&gt; secondIndicator.Rect.Width &lt;/span&gt;&lt;span style="color:#000000;"&gt;+&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#800080;"&gt;2&lt;/span&gt;&lt;span style="color:#000000;"&gt;, Y, Width, Height);
        parent.ChildElements.Add(deviceIcon);
        parent.ChildElements.Add(textElement);
        parent.ChildElements.Add(firstIndicator);
        &lt;/span&gt;&lt;span style="color:#0000FF;"&gt;if&lt;/span&gt;&lt;span style="color:#000000;"&gt; (deviceInfo.DeviceStatus &lt;/span&gt;&lt;span style="color:#000000;"&gt;==&lt;/span&gt;&lt;span style="color:#000000;"&gt; DeviceState.Online)
        {
            parent.ChildElements.Add(secondIndicator);
        }
        firstIndicator.ToolTipItem &lt;/span&gt;&lt;span style="color:#000000;"&gt;=&lt;/span&gt;&lt;span style="color:#000000;"&gt; deviceInfo.GetDeviceStatusToolTip();
        secondIndicator.ToolTipItem &lt;/span&gt;&lt;span style="color:#000000;"&gt;=&lt;/span&gt;&lt;span style="color:#000000;"&gt; deviceInfo.GetDeviceOnlineStatusToolTip();


        value &lt;/span&gt;&lt;span style="color:#000000;"&gt;=&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#0000FF;"&gt;true&lt;/span&gt;&lt;span style="color:#000000;"&gt;;
    }
    &lt;/span&gt;&lt;span style="color:#0000FF;"&gt;return&lt;/span&gt;&lt;span style="color:#000000;"&gt; value;
}&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/pre&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;Set the creation filter:&lt;/p&gt;

&lt;p&gt;&lt;span style="color:#0000ff;"&gt;this&lt;/span&gt;.ultraGrid.CreationFilter = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; GroupRowIndicatorsCreationFilter();&lt;/p&gt;

&lt;pre&gt;&amp;#160;&lt;/pre&gt;

&lt;h4&gt;TabClosing Event Order&lt;/h4&gt;

&lt;p&gt;This tip is kind of specific, but thought I'd post it here anyway.&amp;#160; If you are using the Mdi Tabbed Workspace (and I assume the Mdi Tab Control) then a little gotcha is that when the user closes a form, either by clicking the 'X' or by you firing the form.Close() method the Mdi_Tab_Closing method is fired BEFORE the Form_Closing event.&amp;#160; If you think about it, it makes sense, however it is a pain in the butt if you want to handle someone closing a tab, and someone closing the whole app differently.&amp;#160; In our app we have functionality similar to visual studio, if you caused it to fire?!? Short answer is you can't.&amp;#160; So here is a little method that will fire before either Mdi_Tab_Closing and Form_Closing.&lt;/p&gt;

&lt;div class="wlWriterSmartContent" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:fb9f21f0-6621-426e-bc05-dae00ba6a01e" style="padding-right:0px;display:inline;padding-left:0px;float:none;padding-bottom:0px;margin:0px;padding-top:0px;"&gt;&lt;pre style="background-color:White;overflow:auto;"&gt;&lt;div&gt;&lt;span style="color:#0000FF;"&gt;protected&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#0000FF;"&gt;override&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#0000FF;"&gt;void&lt;/span&gt;&lt;span style="color:#000000;"&gt; DefWndProc(&lt;/span&gt;&lt;span style="color:#0000FF;"&gt;ref&lt;/span&gt;&lt;span style="color:#000000;"&gt; System.Windows.Forms.Message m)
{
      &lt;/span&gt;&lt;span style="color:#0000FF;"&gt;if&lt;/span&gt;&lt;span style="color:#000000;"&gt; (m.Msg &lt;/span&gt;&lt;span style="color:#000000;"&gt;==&lt;/span&gt;&lt;span style="color:#000000;"&gt; WM_SYSCOMMAND &lt;/span&gt;&lt;span style="color:#000000;"&gt;&amp;amp;&amp;amp;&lt;/span&gt;&lt;span style="color:#000000;"&gt; m.WParam.ToInt32() &lt;/span&gt;&lt;span style="color:#000000;"&gt;==&lt;/span&gt;&lt;span style="color:#000000;"&gt; SC_CLOSE)
     {
          applicationClosing &lt;/span&gt;&lt;span style="color:#000000;"&gt;=&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#0000FF;"&gt;true&lt;/span&gt;&lt;span style="color:#000000;"&gt;;
     }
     &lt;/span&gt;&lt;span style="color:#0000FF;"&gt;base&lt;/span&gt;&lt;span style="color:#000000;"&gt;.DefWndProc(&lt;/span&gt;&lt;span style="color:#0000FF;"&gt;ref&lt;/span&gt;&lt;span style="color:#000000;"&gt; m);
}&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;The applicationClosing bool allows me to check if the user hit the X button when I'm in my Mdi_Tab_Closing.&amp;#160; If you have an 'Exit' option from a file menu then in that code you will want to set applicationClosing = true in there as well.&lt;/p&gt;&lt;img src="http://www.objectsharp.com/cs/aggbug.aspx?PostID=139615" width="1" height="1"&gt;</content><author><name>dan</name><uri>http://www.objectsharp.com/cs/members/dan.aspx</uri></author></entry><entry><title>Reset permissions for existing folders on a new Vista Install</title><link rel="alternate" type="text/html" href="http://www.objectsharp.com/cs/blogs/dan/archive/2007/02/07/reset-permissions-for-existing-folders-on-a-new-vista-install.aspx" /><id>http://www.objectsharp.com/cs/blogs/dan/archive/2007/02/07/reset-permissions-for-existing-folders-on-a-new-vista-install.aspx</id><published>2007-02-07T02:45:44Z</published><updated>2007-02-07T02:45:44Z</updated><content type="html">&lt;p&gt;I just did a fresh install of Vista Ultimate on my home desktop PC.&amp;nbsp; The install all went fairly smooth except for 2 things:&lt;/p&gt; &lt;p&gt;1) IIS was not installed, and I missed the little checkbox to &lt;a href="http://objectsharp.com/cs/blogs/dan/archive/2007/02/07/iis-7-asp-and-vista.aspx" target="_blank"&gt;install ASP support&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;2) I had a lot of problems accessing my existing Documents And Settings folders and could not access (only read access) my other partitions.&amp;nbsp;&amp;nbsp;Even&amp;nbsp;as&amp;nbsp;Administrator I could not seem to set permissions on these folders and drives so I could write to them.&amp;nbsp; Thankfully &lt;a href="http://blogs.msdn.com/tims/default.aspx"&gt;Tim Sneath&lt;/a&gt;&amp;nbsp;came to the rescue with a posting about '&lt;a href="http://blogs.msdn.com/tims/archive/2006/11/10/windows-vista-secret-11-deleting-the-undeletable.aspx" target="_blank"&gt;Deleting the Undeletable&lt;/a&gt;' in which he explains how to reset the permissions on files to give yourself access to them.&amp;nbsp; &lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;it's not unusual to find some folders that can't be accessed, even by an administrator, because their &lt;a href="http://en.wikipedia.org/wiki/Access_control_list"&gt;ACLs&lt;/a&gt; were set for accounts with &lt;a href="http://en.wikipedia.org/wiki/Security_Identifier"&gt;SIDs&lt;/a&gt; that applied to an old partition&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Tim provides a quick batch command that will allow you to reset the proper permissions for the Administrators group.&amp;nbsp; &lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;takeown /f %1 /r /d y&lt;br&gt;icacls %1 /grant administrators:F /t&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Just pass it a directory to start at (it is recursive).  &lt;p&gt;Big thanks to Tim.&lt;/p&gt;&lt;img src="http://www.objectsharp.com/cs/aggbug.aspx?PostID=19344" width="1" height="1"&gt;</content><author><name>dan</name><uri>http://www.objectsharp.com/cs/members/dan.aspx</uri></author></entry><entry><title>IIS 7, ASP, and Vista</title><link rel="alternate" type="text/html" href="http://www.objectsharp.com/cs/blogs/dan/archive/2007/02/07/iis-7-asp-and-vista.aspx" /><id>http://www.objectsharp.com/cs/blogs/dan/archive/2007/02/07/iis-7-asp-and-vista.aspx</id><published>2007-02-07T02:43:18Z</published><updated>2007-02-07T02:43:18Z</updated><content type="html">&lt;p&gt;When I did a fresh install of Vista on my home desktop machine it did not install IIS by default which is to be expected.&amp;nbsp; But the real problems started when I could not find out how to install ASP support.&amp;nbsp; Anytime I would try and load an aspx file it would say it didn't know how to handle .aspx as a static file.&amp;nbsp; Very frustrating.&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.objectsharp.com/blogs/Barry" target="_blank"&gt;Barry Gervin&lt;/a&gt; provided a link that shows the &lt;a href="http://msdn2.microsoft.com/en-US/library/aa964620(vs.80).aspx" target="_blank"&gt;step by step instructions&lt;/a&gt; on how to properly install IIS 7 on vista, including the slightly hidden ASP.NET support.&amp;nbsp; Is anyone really installing IIS7 and not installing ASP.NET support?&lt;/p&gt;&lt;img src="http://www.objectsharp.com/cs/aggbug.aspx?PostID=19343" width="1" height="1"&gt;</content><author><name>dan</name><uri>http://www.objectsharp.com/cs/members/dan.aspx</uri></author></entry><entry><title>Vista DreamScene</title><link rel="alternate" type="text/html" href="http://www.objectsharp.com/cs/blogs/dan/archive/2007/02/07/vista-dreamscene.aspx" /><id>http://www.objectsharp.com/cs/blogs/dan/archive/2007/02/07/vista-dreamscene.aspx</id><published>2007-02-07T02:41:14Z</published><updated>2007-02-07T02:41:14Z</updated><content type="html">&lt;p&gt;&lt;a href="http://objectsharp.com/cs/blogs/dan/WindowsLiveWriter/VistaDreamScene_F7C1/02-02-07_1251%5B2%5D.jpg"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px;" height="240" src="http://objectsharp.com/cs/blogs/dan/WindowsLiveWriter/VistaDreamScene_F7C1/02-02-07_1251_thumb.jpg" width="180" align="left" border="0"&gt;&lt;/a&gt; While I was out at the Vista Ice House in Toronto last week they were demo'ing '&lt;a href="http://windowsultimate.com/blogs/extras/archive/2007/02/02/windows-dreamscene.aspx" target="_blank"&gt;DreamScene&lt;/a&gt;', which is movies as desktop wallpapers.&amp;nbsp; The basic idea is that you take a small subtle looping video and apply it as your background.&amp;nbsp; Obviously this is eye candy only, but it is pretty impressive eye candy when done properly.&amp;nbsp; There is a &lt;a href="http://windowsultimate.com/blogs/extras/archive/2007/02/02/windows-dreamscene.aspx" target="_blank"&gt;video here&lt;/a&gt; that shows a couple of examples.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;DreamScene is one of those annoying &lt;a href="http://windowsultimate.com" target="_blank"&gt;Ultimate Extras&lt;/a&gt; which must really drive anyone without Ultimate absolutely nuts.&amp;nbsp; Thankfully I have Ultimate, and managed to get my hands on a beta (the official release is apparently some vague time in the future), only problem is that the beta does not seem to support dual-monitors, something that hopefully will be addressed in time for the final release.&amp;nbsp; &lt;a href="http://www.wincustomize.com" target="_blank"&gt;WinCustomize&lt;/a&gt; has started a page where you can get some &lt;a href="http://dream.wincustomize.com/" target="_blank"&gt;DreamScene movies&lt;/a&gt;, apparently both in-house created, and user submitted.&amp;nbsp; It doesn't appear that the page is ready for primetime, but you can check it out none the less.&lt;/p&gt;&lt;img src="http://www.objectsharp.com/cs/aggbug.aspx?PostID=19342" width="1" height="1"&gt;</content><author><name>dan</name><uri>http://www.objectsharp.com/cs/members/dan.aspx</uri></author></entry><entry><title>How Smart Are You?</title><link rel="alternate" type="text/html" href="http://www.objectsharp.com/cs/blogs/dan/archive/2005/02/24/1449.aspx" /><id>http://www.objectsharp.com/cs/blogs/dan/archive/2005/02/24/1449.aspx</id><published>2005-02-24T18:03:00Z</published><updated>2005-02-24T18:03:00Z</updated><content type="html">How smart are you?



&lt;a href="http://crux.baker.edu/cdavis09/roses.html"&gt;http://crux.baker.edu/cdavis09/roses.html&lt;/a&gt;

A very challenging little game, some people can do it in 5 minutes, apparently others take a year... took me about 20 minutes.
&lt;img src="http://www.objectsharp.com/cs/aggbug.aspx?PostID=1449" width="1" height="1"&gt;</content><author><name>dan</name><uri>http://www.objectsharp.com/cs/members/dan.aspx</uri></author></entry><entry><title>Is Google Taking Over My Computer?</title><link rel="alternate" type="text/html" href="http://www.objectsharp.com/cs/blogs/dan/archive/2004/10/14/938.aspx" /><id>http://www.objectsharp.com/cs/blogs/dan/archive/2004/10/14/938.aspx</id><published>2004-10-15T02:44:00Z</published><updated>2004-10-15T02:44:00Z</updated><content type="html">It has been rumoured for months, but finally today it was announced that google had entered the Desktop Search business with &lt;a href="http://desktop.google.com"&gt;Google Desktop&lt;/a&gt;.  Anyone that has ever used Microsoft Windows Search knows it is a big pain, and it is slow and the indexing is pretty bad.   Needless to say I've been looking forward to the newest addition to the &lt;a href="http://www.google.com"&gt;Google&lt;/a&gt; family, and I downloaded it as soon as I heard.
&lt;br&gt;Right off the bat I had a bit of a problem with the install not working because I had Microsoft Firewall Client Version 3 installed, instead of version 4.  Even though this is disabled it would not let me continue the install.
&lt;br&gt;
Once I was past that problem, it was fine and I started playing with it.  It is amazing.  Amazing. 
&lt;br&gt;&lt;br&gt;
It does a one time indexing of your system when there is some idle time, and after that it just keeps track of new and changed files as you work.  The searches are amazingly quick and search text files, Word docs, Excel spreadsheets,  Outlook mail, browser cache, and all your file names.  To do a search for 'jpg' took 0.04seconds and it returned every picture on my computer and every email in which I ever sent, or mentioned a jpg file in.  Amazing.  Why have you  not downloaded it yet?
&lt;br&gt;&lt;Br&gt;
There is one &lt;b&gt;beef&lt;/b&gt; that I have.  I've considered this problem and I've decided it might be a premeditated decision, but I hope it is not.  Google Desktop does not look at .cs files, as a C# developer this is very frustrating.  For the VB.NET guys it doesn't do .vb files either...  Google Desktop will treat .java .c .h .cpp files as text files AND allow for a "filetype:c" or "filetype:java" search.  But nothing on .cs files.   Google what is the deal with this?  I also haven't been able to find anyway to change how certain file types are handled.


&lt;br&gt;&lt;br&gt;
Despite this problem I still love it, it integrates itself with &lt;a href="http://www.google.com"&gt;http://www.google.com&lt;/a&gt; so that any search on the site will also tell you if you have matches on your own machine, this is done by intercepting google requests and then merging your results with the html when your response comes back.  None of your personal info is sent to Google, rest easy.   The only thing that is sent is how many searches are run, and how long they took, and even this you can opt out of.

&lt;br&gt;&lt;Br&gt;
Google is the greatest thing in the world, &lt;a href="http://www.objectsharp.com/blogs/dave"&gt;Dave&lt;/a&gt; will tell you how much &lt;a href="http://objectsharp.com/Blogs/dave/archive/2004/06/10/610.aspx"&gt;he loves Google&lt;/a&gt; if you ask him.   
&lt;br&gt; As well as taking over the internet, it is also taking over my machine, I now have my &lt;a href="http://gmail.google.com/gmail"&gt;Gmail&lt;/a&gt;, and the 
&lt;a href="http://toolbar.google.com/gmail-helper/"&gt;Gmail Notifier&lt;/a&gt;, 
&lt;a href="http://picasa.google.com/picasa/"&gt;Picasa&lt;/a&gt; for all my pictures, 
&lt;a href="http://desktop.google.com"&gt;Google Desktop&lt;/a&gt;,  and &lt;a href="http://toolbar.google.com/deskbar/index.html"&gt;Google Deskbar&lt;/a&gt;.  I don't mind this take over a bit.


&lt;img src="http://www.objectsharp.com/cs/aggbug.aspx?PostID=938" width="1" height="1"&gt;</content><author><name>dan</name><uri>http://www.objectsharp.com/cs/members/dan.aspx</uri></author></entry><entry><title>Clipboard Copying Problem</title><link rel="alternate" type="text/html" href="http://www.objectsharp.com/cs/blogs/dan/archive/2004/08/20/836.aspx" /><id>http://www.objectsharp.com/cs/blogs/dan/archive/2004/08/20/836.aspx</id><published>2004-08-20T19:58:00Z</published><updated>2004-08-20T19:58:00Z</updated><content type="html">&lt;P&gt;I recently ran into a problem with the clipboard that is apparently a fairly common problem without a common answer.&lt;BR&gt;The problem occurs while making a temporary copy of the clipboard.&lt;/P&gt;
&lt;P&gt;I needed to put something into the clipboard, but I didn't want the user to lose what they already had in there, the&amp;nbsp;easy way that I assumed would work&amp;nbsp;looked like this:&lt;/P&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;P&gt;&lt;FONT size=2&gt;IDataObject oldClipboard = Clipboard.GetDataObject();&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#008000&gt;&lt;FONT size=2&gt;//random clipboard manipulation here&lt;/FONT&gt;&lt;/P&gt;&lt;/FONT&gt;
&lt;P&gt;&lt;FONT size=2&gt;Clipboard.SetDataObject(oldClipboard,&lt;FONT color=#0000ff&gt;true&lt;/FONT&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;BR&gt;The &lt;FONT color=#0000ff&gt;true &lt;/FONT&gt;ensures that the data is held in the clipboard even after the program closes.&amp;nbsp; This solution meets with a "&lt;STRONG&gt;The requested clipboard operation failed&lt;/STRONG&gt;" message if there is ever anything actually in the clipboard originally.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So here is the proper way of making a copy of the clipboard data, assuming of course that you have no idea what is in the clipboard before you arrived.&amp;nbsp; An important note if you aren't aware of how the clipboard is structured.&amp;nbsp; When you copy text out a richtextbox it is actually stored in several different ways:&lt;BR&gt;Rich Text Format&lt;BR&gt;Rich Text Format Without Objects&lt;BR&gt;RTF As Text&lt;BR&gt;System.String&lt;BR&gt;UnicodeText&lt;BR&gt;Text&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;The solution:&lt;/FONT&gt;&lt;/P&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;P&gt;&lt;FONT size=2&gt;IDataObject oldClipboard = Clipboard.GetDataObject();&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;DataObject newClipboard = &lt;FONT color=#0000ff&gt;new&lt;/FONT&gt; DataObject();&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;&lt;FONT color=#0000ff&gt;string&lt;/FONT&gt;[] s;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;s = oldClipboard.GetFormats(); &lt;FONT color=#008000&gt;//gets all the possible formats for that data&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;
&lt;P&gt;&lt;FONT size=2&gt;&lt;FONT color=#0000ff&gt;foreach&lt;/FONT&gt;(&lt;FONT color=#0000ff&gt;string&lt;/FONT&gt; ns &lt;FONT color=#0000ff&gt;in&lt;/FONT&gt; s)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;{&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;newClipboard.SetData(ns,oldClipboard.GetData(ns)); &lt;FONT color=#008000&gt;//re-associate the old data with the proper types&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;
&lt;P&gt;&lt;FONT size=2&gt;}&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#008000&gt;&lt;FONT size=2&gt;//this is where your clipboard manipulation goes.&lt;/FONT&gt;&lt;/P&gt;&lt;/FONT&gt;
&lt;P&gt;&lt;FONT size=2&gt;Clipboard.SetDataObject(newClipboard,&lt;FONT color=#0000ff&gt;true&lt;/FONT&gt;); &lt;/FONT&gt;&lt;FONT color=#008000&gt;&lt;FONT size=2&gt;//true makes sure the data persists&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;&lt;/FONT&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;img src="http://www.objectsharp.com/cs/aggbug.aspx?PostID=836" width="1" height="1"&gt;</content><author><name>dan</name><uri>http://www.objectsharp.com/cs/members/dan.aspx</uri></author></entry><entry><title>Web MSN plus SP2 and BitTorrent</title><link rel="alternate" type="text/html" href="http://www.objectsharp.com/cs/blogs/dan/archive/2004/08/09/809.aspx" /><id>http://www.objectsharp.com/cs/blogs/dan/archive/2004/08/09/809.aspx</id><published>2004-08-10T03:39:00Z</published><updated>2004-08-10T03:39:00Z</updated><content type="html">&lt;P&gt;Well MSN has knocked one of its shortfalls of the list (it's pretty long). &lt;/P&gt;
&lt;P&gt;I heard last week that Microsoft had openned up a web-based version of its popular MSN client, but everytime I tried it the site seemed to be down. However it seems to be up and pretty stable, and it's pretty nice too. Microsoft seems to be doing some pretty great things with WebGUI's, WebOutlook looks almost identical to normal Outlook, and now web MSN looks amazingly like MSN as well. &lt;/P&gt;
&lt;P&gt;So everyone give it a try at &lt;A href="http://webmessenger.msn.com/"&gt;http://webmessenger.msn.com/&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also a note on SP2, anyone installed it yet? I heard a lot of bad things during the beta stages, I assume that Microsoft fixed all these problems before they turned it Gold, but I'm still a little hesitant. IBM has &lt;A href="http://zdnet.com.com/2100-1104_2-5302346.html"&gt;apparently asked its users to hold off with the install&lt;/A&gt;. Apparently this is routine, but I now have a mounting list of 'apparents and hopes'. The list of improvements does sound nice though, maybe not for myself (but the new WiFi improvements should be interesting to see) but more for the family that I have become the unofficial tech-support for. There is a good article at &lt;A href="http://www.neowin.net/comments.php?id=23145&amp;amp;category=main"&gt;NeoWin&lt;/A&gt; about the improvements and beefed up security. &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My last note is that at &lt;A href="http://sp2torrent.com/index.php"&gt;http://sp2torrent.com/index.php&lt;/A&gt; you can get a Torrent for the new SP2 (which is a pretty big file). I'm glad to see that there are people trying to show a legal use for P2P before the US Government ups and makes it illegal. My car has illegal uses too, but I haven't heard of any bills before the US Congress to ban cars for any use...&lt;/P&gt;&lt;img src="http://www.objectsharp.com/cs/aggbug.aspx?PostID=809" width="1" height="1"&gt;</content><author><name>dan</name><uri>http://www.objectsharp.com/cs/members/dan.aspx</uri></author></entry><entry><title>Canada Lost The Stanley Cup?</title><link rel="alternate" type="text/html" href="http://www.objectsharp.com/cs/blogs/dan/archive/2004/06/10/604.aspx" /><id>http://www.objectsharp.com/cs/blogs/dan/archive/2004/06/10/604.aspx</id><published>2004-06-10T16:26:00Z</published><updated>2004-06-10T16:26:00Z</updated><content type="html">More than a few of my American friends have used Tampa Bay's win in the Stanley Cup finals as an attempt to bash on Canadian hockey.  'Canada hasn't won a cup in more than a decade'.  
&lt;br&gt;Haven't they?
&lt;br&gt;Yes geographically the cup has not been won by a team north of the border.  But where do you think the cup spends most of its time in the off-season?  Canada.  Each players gets a day (or week, some amount of time) to bring the cup to their home town.  Which means that the cup will spend 2 days south of the border this summer.
&lt;br&gt;
Thats right, Tampa Bay has 19 Canadians and only &lt;b&gt;2&lt;/b&gt; Americans.
&lt;br&gt;Ben Clymer (5 Games, 0 points, 2 shots)
&lt;br&gt;John Grahame (1 Game (only 34 minutes), 3.54 GAA, 0.884 Save %)
&lt;br&gt;&lt;br&gt;
And here are some interesting numbers related to the NHL's yearly hardware giveaway.  Big thanks to Gord for the numbers.
&lt;br&gt;&lt;br&gt;
There have been 112 &lt;b&gt;Stanley Cups&lt;/b&gt;:
&lt;br&gt;
&lt;br&gt;111 Canadian Captains.
&lt;br&gt;107 Canadian goalies. 
&lt;br&gt;39 &lt;b&gt;Conn Smythe&lt;/b&gt; Winners, 37 Canadians. 
&lt;br&gt;&lt;br&gt;
Can you name the non-Canadians?  One of the Conn Smythe winners is easy, the other, won back in 1994...
&lt;br&gt;You can email me at daforsyth !at! objectsharp.com if you want the answers.&lt;br&gt;
&lt;br&gt;&lt;br&gt;
&lt;br&gt;49 &lt;b&gt;Norris Trophy&lt;/b&gt; Winners, 39 Canadians. 
&lt;br&gt;Lidstrom 3 times, Chelios 3 times, Leetch twice, Rod Langway twice (actually born in Taiwan).
&lt;br&gt;
&lt;br&gt;76 &lt;b&gt;Vezina&lt;/b&gt; Winners, 65 Canadians.
&lt;br&gt;Before 1982 this was essentially the &lt;b&gt;Jennings&lt;/b&gt; and I believe that the 100+ Goalies that received the Vezina prior to 1982 are all Canadian. I could be wrong on a couple though.
&lt;br&gt;Also of note is that of the 11 non-Canadians winners, 6 of them are Hasek.
&lt;br&gt;

&lt;br&gt;30 &lt;b&gt;Jack Adams&lt;/b&gt;, 30 Canadians.  This year might be a first, but my vote is with Sutter.

&lt;br&gt;
&lt;br&gt;33 &lt;b&gt;Lester B. Pearson Awards (NHLPA voted MVP)&lt;/b&gt;, 27 Canadians. Jagr
twice, Hasek twice, Naslund, Federov. Hull may be a legal american, but
he was born and bred on Canadian hockey so I don't count him as an
exception.
&lt;br&gt;
&lt;br&gt;80 Years of &lt;b&gt;Hart Trophies&lt;/b&gt;. 73 Canadians. Hasek twice, Jagr, Forsberg,
Federov, Mikita twice. Once again I count Hull as a Canadian.
&lt;br&gt;
&lt;br&gt;86 &lt;b&gt;Scoring Leaders/Art Ross&lt;/b&gt;, 76 Canadians. Jagr 5 times, Mikita 4
times, Forsberg once. For this I'm hazy on the pre-1960 winners, but
I'm fairly certain they were all Canadian.
&lt;br&gt;&lt;Br&gt;
So there are the numbers, also of note though is that most news outlets are reporting that Calgary had up to 5000 more people at their 'we lost' party than Tampa Bay had for their 'we won' party...
&lt;br&gt;
&lt;br&gt;
Don't get me wrong, I would have loved Calgary to win the Cup, but by the same token lets not pretend this is an Olympic Gold Medal won by a team of all Americans..... back in 1980.....
&lt;br&gt;&lt;Br&gt;
&lt;img src="http://www.objectsharp.com/blogs/dave/images/Canada.gif"&gt;
&lt;br&gt;Thanks to Dave for the flag.&lt;img src="http://www.objectsharp.com/cs/aggbug.aspx?PostID=604" width="1" height="1"&gt;</content><author><name>dan</name><uri>http://www.objectsharp.com/cs/members/dan.aspx</uri></author></entry></feed>