<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">
  <channel>
    <title>Zupancic Perspective (v2.0)</title>
    <link>http://blog.devstone.com/aaron/</link>
    <description>An insight into the world of R. Aaron Zupancic, software development (.NET, et al), muses, and much more...</description>
    <language>en-us</language>
    <copyright>R. Aaron Zupancic</copyright>
    <lastBuildDate>Wed, 17 Jun 2009 19:20:03 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.0.7226.0</generator>
    <managingEditor>aaron@devstone.com</managingEditor>
    <webMaster>aaron@devstone.com</webMaster>
    <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/ZupancicPerspective" type="application/rss+xml" /><item>
      <trackback:ping>http://blog.devstone.com/aaron/Trackback.aspx?guid=41af86d0-e4cf-47b5-abd8-8f048a3cff61</trackback:ping>
      <pingback:server>http://blog.devstone.com/aaron/pingback.aspx</pingback:server>
      <pingback:target>http://blog.devstone.com/aaron/PermaLink,guid,41af86d0-e4cf-47b5-abd8-8f048a3cff61.aspx</pingback:target>
      <dc:creator>R. Aaron Zupancic (Administrator)</dc:creator>
      <wfw:comment>http://blog.devstone.com/aaron/CommentView,guid,41af86d0-e4cf-47b5-abd8-8f048a3cff61.aspx</wfw:comment>
      <wfw:commentRss>http://blog.devstone.com/aaron/SyndicationService.asmx/GetEntryCommentsRss?guid=41af86d0-e4cf-47b5-abd8-8f048a3cff61</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <font size="2" face="Tahoma">Well, I've
always <a href="http://support.microsoft.com/default.aspx?scid=kb;en-us;261186">loved
classical music</a>...too bad I'm not on Windows 95 anymore.<br /></font>
        <p>
        </p>
        <img width="0" height="0" src="http://blog.devstone.com/aaron/aggbug.ashx?id=41af86d0-e4cf-47b5-abd8-8f048a3cff61" />
      </body>
      <title>Windows Classical Music</title>
      <guid isPermaLink="false">http://blog.devstone.com/aaron/PermaLink,guid,41af86d0-e4cf-47b5-abd8-8f048a3cff61.aspx</guid>
      <link>http://feedproxy.google.com/~r/ZupancicPerspective/~3/m7fuwwlrNQ8/WindowsClassicalMusic.aspx</link>
      <pubDate>Wed, 17 Jun 2009 19:20:03 GMT</pubDate>
      <description>&lt;font size="2" face="Tahoma"&gt;Well, I've always &lt;a href="http://support.microsoft.com/default.aspx?scid=kb;en-us;261186"&gt;loved
classical music&lt;/a&gt;...too bad I'm not on Windows 95 anymore.&lt;br&gt;
&lt;/font&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.devstone.com/aaron/aggbug.ashx?id=41af86d0-e4cf-47b5-abd8-8f048a3cff61" /&gt;</description>
      <comments>http://blog.devstone.com/aaron/CommentView,guid,41af86d0-e4cf-47b5-abd8-8f048a3cff61.aspx</comments>
      <category>Humor</category>
    <feedburner:origLink>http://blog.devstone.com/aaron/2009/06/17/WindowsClassicalMusic.aspx</feedburner:origLink></item>
    <item>
      <trackback:ping>http://blog.devstone.com/aaron/Trackback.aspx?guid=21a5f7e2-3cb4-4092-a438-11015b78f657</trackback:ping>
      <pingback:server>http://blog.devstone.com/aaron/pingback.aspx</pingback:server>
      <pingback:target>http://blog.devstone.com/aaron/PermaLink,guid,21a5f7e2-3cb4-4092-a438-11015b78f657.aspx</pingback:target>
      <dc:creator>R. Aaron Zupancic (Administrator)</dc:creator>
      <wfw:comment>http://blog.devstone.com/aaron/CommentView,guid,21a5f7e2-3cb4-4092-a438-11015b78f657.aspx</wfw:comment>
      <wfw:commentRss>http://blog.devstone.com/aaron/SyndicationService.asmx/GetEntryCommentsRss?guid=21a5f7e2-3cb4-4092-a438-11015b78f657</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <font face="Tahoma">
          <font size="2">This
is definitely not news, but I wanted to blog it anyway.<br /><br />
Having recently just reset a development server to use Windows Server 2008, I needed
to open the firewall to allow ICMP packets through.  Essentially, I wanted to
have the server respond to PING requests.  On a fresh Windows Vista or Windows
Server 2008 install (and I imagine Windows 7, though I've not checked), the ICMP protocol
is blocked by default; the server won't respond to PINGs.  When you ping an IP
address and don't get a reply that doesn't mean that there isn't a computer on the
other end, but it sure is a handy way to check.<br /><br />
In Windows Vista/2008 enabling ICMP through the firewall isn't difficult, but if you
want to use a GUI, you have to do it through an inbound rule in the <b>Windows Firewall
with Advanced Security</b> option.<br /><br />
Personally, I prefer to do it via the command-line through this simple operation: <b>netsh
firewall set icmpsetting 8</b></font>
          <br />
        </font>
        <p>
        </p>
        <img width="0" height="0" src="http://blog.devstone.com/aaron/aggbug.ashx?id=21a5f7e2-3cb4-4092-a438-11015b78f657" />
      </body>
      <title>Enabling PING in Windows Server 2008 and Vista</title>
      <guid isPermaLink="false">http://blog.devstone.com/aaron/PermaLink,guid,21a5f7e2-3cb4-4092-a438-11015b78f657.aspx</guid>
      <link>http://feedproxy.google.com/~r/ZupancicPerspective/~3/dv0eRNddONE/EnablingPINGInWindowsServer2008AndVista.aspx</link>
      <pubDate>Fri, 12 Jun 2009 22:41:21 GMT</pubDate>
      <description>&lt;font face="Tahoma"&gt;&lt;font size="2"&gt;This is definitely not news, but I wanted to blog
it anyway.&lt;br&gt;
&lt;br&gt;
Having recently just reset a development server to use Windows Server 2008, I needed
to open the firewall to allow ICMP packets through.&amp;nbsp; Essentially, I wanted to
have the server respond to PING requests.&amp;nbsp; On a fresh Windows Vista or Windows
Server 2008 install (and I imagine Windows 7, though I've not checked), the ICMP protocol
is blocked by default; the server won't respond to PINGs.&amp;nbsp; When you ping an IP
address and don't get a reply that doesn't mean that there isn't a computer on the
other end, but it sure is a handy way to check.&lt;br&gt;
&lt;br&gt;
In Windows Vista/2008 enabling ICMP through the firewall isn't difficult, but if you
want to use a GUI, you have to do it through an inbound rule in the &lt;b&gt;Windows Firewall
with Advanced Security&lt;/b&gt; option.&lt;br&gt;
&lt;br&gt;
Personally, I prefer to do it via the command-line through this simple operation: &lt;b&gt;netsh
firewall set icmpsetting 8&lt;/b&gt;&lt;/font&gt;
&lt;br&gt;
&lt;/font&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.devstone.com/aaron/aggbug.ashx?id=21a5f7e2-3cb4-4092-a438-11015b78f657" /&gt;</description>
      <comments>http://blog.devstone.com/aaron/CommentView,guid,21a5f7e2-3cb4-4092-a438-11015b78f657.aspx</comments>
      <category>Windows Vista</category>
      <category>Windows Server 2008</category>
    <feedburner:origLink>http://blog.devstone.com/aaron/2009/06/12/EnablingPINGInWindowsServer2008AndVista.aspx</feedburner:origLink></item>
    <item>
      <trackback:ping>http://blog.devstone.com/aaron/Trackback.aspx?guid=b1532b74-f32c-4bfb-9943-294340251147</trackback:ping>
      <pingback:server>http://blog.devstone.com/aaron/pingback.aspx</pingback:server>
      <pingback:target>http://blog.devstone.com/aaron/PermaLink,guid,b1532b74-f32c-4bfb-9943-294340251147.aspx</pingback:target>
      <dc:creator>R. Aaron Zupancic (Administrator)</dc:creator>
      <wfw:comment>http://blog.devstone.com/aaron/CommentView,guid,b1532b74-f32c-4bfb-9943-294340251147.aspx</wfw:comment>
      <wfw:commentRss>http://blog.devstone.com/aaron/SyndicationService.asmx/GetEntryCommentsRss?guid=b1532b74-f32c-4bfb-9943-294340251147</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <font face="Tahoma">As you may or may not be aware IE 7+ (and other browsers) support
using CSS 2.1 </font>
          <a href="http://www.w3.org/TR/CSS21/selector.html">
            <font face="Tahoma">attribute
selectors</font>
          </a>
          <font face="Tahoma">.  Attribute selectors allow you to specify
a style on an element whose element matches a particular pattern.  For instance:</font>
        </p>
        <blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
          <p>
            <font face="Courier New">td[x] { font-weight:bold; }</font>
          </p>
        </blockquote>
        <p>
          <font face="Tahoma">This selector will bold the text of any TD element on the page
that has an attribute "x" (regardless of value).  Other attribute selector styles
include:</font>
        </p>
        <blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
          <p>
            <font face="Tahoma">
              <font face="Courier New">...[x="value"]</font> matches where x
is exactly 'value'<br /><font face="Courier New">...[x~="value"]</font> matches where x contains a space-separated list
of values, one of which is exactly 'value'<br /><font face="Courier New">...[x^="value"]</font> matches where the attribute x begins
with 'value'<br /><font face="Courier New">...[x$="value"]</font> matches where the attribute x ends
with 'value'<br /><font face="Courier New">...[x*="value"]</font> matches where the attribute x contains
'value'<br /><font face="Courier New">...[x|="value"]</font> matches where the attribute x begins
with either 'value' or 'value-'</font>
          </p>
        </blockquote>
        <p>
          <font face="Tahoma">In and of themselves, these are pretty darn cool.  You can
do some neat things with CSS and HTML.</font>
        </p>
        <p>
          <font face="Tahoma">I ran into an interested scenario this past week that I'd like
to share.  I have some JavaScript that alters the value of attributes at runtime. 
I found that the page doesn't automatically update according to the stylesheet specification. 
Curiously, it would update when I moused-over the element in question.</font>
        </p>
        <p>
          <font face="Tahoma">I found, however, that I could force the issue by assigning the
CSS classname to the element that it already has.  This is enough to trigger
the change and have the element update according to its attribute values.</font>
        </p>
        <blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
          <p>
            <font face="Courier New">&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;<br />
&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;<br />
&lt;head&gt;<br />
   &lt;style type="text/css"&gt;<br />
      td[req] { font-weight:bold; }<br />
      td[err="1"] { color:red !important; }<br />
   &lt;/style&gt;<br />
   &lt;script type="text/javascript"&gt;<br />
      function fn() {<br />
         var td = document.getElementById("t");<br />
         td.err = "0";<br />
         td.className = td.className; 
// trigger the change by reassigning the CSS class<br />
      }<br />
   &lt;/script&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;<br />
   &lt;table&gt;<br />
      &lt;tr&gt;&lt;td class="test" err="1" req="1" id="t"&gt;Cell&lt;/td&gt;&lt;/tr&gt;<br />
   &lt;/table&gt;<br />
   &lt;button onclick="javascript:fn();"&gt;Remove Error&lt;/button&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</font>
          </p>
        </blockquote>
        <p>
          <font face="Tahoma">Interestingly, for this to work properly in a non-IE browser (such
as Firefox), I found I could not use the object.property=value syntax.  Instead,
I had to use the SetAttribute() function.  Also, with Firefox, reassigning the
className was unnecessary.</font>
        </p>
        <blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
          <p>
            <font face="Courier New">td.setAttribute("err", "0");</font>
          </p>
        </blockquote>
        <p dir="ltr">
          <font face="Tahoma">That's probably the best way to handle it then, for cross-browser
compliance.</font>
        </p>
        <img width="0" height="0" src="http://blog.devstone.com/aaron/aggbug.ashx?id=b1532b74-f32c-4bfb-9943-294340251147" />
      </body>
      <title>CSS Attribute Selector Magic</title>
      <guid isPermaLink="false">http://blog.devstone.com/aaron/PermaLink,guid,b1532b74-f32c-4bfb-9943-294340251147.aspx</guid>
      <link>http://feedproxy.google.com/~r/ZupancicPerspective/~3/_kWxGIIenVg/CSSAttributeSelectorMagic.aspx</link>
      <pubDate>Mon, 04 May 2009 04:28:44 GMT</pubDate>
      <description>&lt;p&gt;
&lt;font face=Tahoma&gt;As you may or may not be aware IE 7+ (and other browsers) support
using CSS 2.1 &lt;/font&gt;&lt;a href="http://www.w3.org/TR/CSS21/selector.html"&gt;&lt;font face=Tahoma&gt;attribute
selectors&lt;/font&gt;&lt;/a&gt;&lt;font face=Tahoma&gt;.&amp;nbsp; Attribute selectors allow you to specify
a style on an element whose element matches a particular pattern.&amp;nbsp; For instance:&lt;/font&gt;
&lt;/p&gt;
&lt;blockquote dir=ltr style="MARGIN-RIGHT: 0px"&gt; 
&lt;p&gt;
&lt;font face="Courier New"&gt;td[x] { font-weight:bold; }&lt;/font&gt;
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
&lt;font face=Tahoma&gt;This selector will bold the text of any TD element on the page that
has an attribute "x" (regardless of value).&amp;nbsp; Other attribute selector styles
include:&lt;/font&gt;
&lt;/p&gt;
&lt;blockquote dir=ltr style="MARGIN-RIGHT: 0px"&gt; 
&lt;p&gt;
&lt;font face=Tahoma&gt;&lt;font face="Courier New"&gt;...[x="value"]&lt;/font&gt; matches where x is
exactly 'value'&lt;br&gt;
&lt;font face="Courier New"&gt;...[x~="value"]&lt;/font&gt; matches where x contains a space-separated&amp;nbsp;list
of values, one of which is exactly 'value'&lt;br&gt;
&lt;font face="Courier New"&gt;...[x^="value"]&lt;/font&gt; matches where the attribute x begins
with 'value'&lt;br&gt;
&lt;font face="Courier New"&gt;...[x$="value"]&lt;/font&gt; matches where the attribute x ends
with 'value'&lt;br&gt;
&lt;font face="Courier New"&gt;...[x*="value"]&lt;/font&gt; matches where the attribute x contains
'value'&lt;br&gt;
&lt;font face="Courier New"&gt;...[x|="value"]&lt;/font&gt; matches where the attribute x begins
with either 'value' or 'value-'&lt;/font&gt;
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
&lt;font face=Tahoma&gt;In and of themselves, these are pretty darn cool.&amp;nbsp; You can
do some neat things with CSS and HTML.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face=Tahoma&gt;I ran into an interested scenario this past week that I'd like to
share.&amp;nbsp; I have some JavaScript that alters the value of attributes at runtime.&amp;nbsp;
I found that the page doesn't automatically update according to the stylesheet specification.&amp;nbsp;
Curiously, it would update when I moused-over the element in question.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face=Tahoma&gt;I found, however, that I could force the issue by assigning the
CSS classname to the element that it already has.&amp;nbsp; This is enough to trigger
the change and have the element update according to its attribute values.&lt;/font&gt;
&lt;/p&gt;
&lt;blockquote dir=ltr style="MARGIN-RIGHT: 0px"&gt; 
&lt;p&gt;
&lt;font face="Courier New"&gt;&amp;lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&amp;gt;&lt;br&gt;
&amp;lt;html xmlns="http://www.w3.org/1999/xhtml"&amp;gt;&lt;br&gt;
&amp;lt;head&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp; &amp;lt;style type="text/css"&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; td[req] { font-weight:bold; }&lt;br&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; td[err="1"] { color:red !important; }&lt;br&gt;
&amp;nbsp;&amp;nbsp; &amp;lt;/style&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp; &amp;lt;script type="text/javascript"&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; function fn() {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; var td = document.getElementById("t");&lt;br&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; td.err = "0";&lt;br&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;td.className = td.className;&amp;nbsp;
// trigger the change by reassigning the CSS class&lt;br&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; }&lt;br&gt;
&amp;nbsp;&amp;nbsp; &amp;lt;/script&amp;gt;&lt;br&gt;
&amp;lt;/head&amp;gt;&lt;br&gt;
&amp;lt;body&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp; &amp;lt;table&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;tr&amp;gt;&amp;lt;td class="test" err="1" req="1" id="t"&amp;gt;Cell&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp; &amp;lt;/table&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp; &amp;lt;button onclick="javascript:fn();"&amp;gt;Remove Error&amp;lt;/button&amp;gt;&lt;br&gt;
&amp;lt;/body&amp;gt;&lt;br&gt;
&amp;lt;/html&amp;gt;&lt;/font&gt;
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
&lt;font face=Tahoma&gt;Interestingly, for this to work properly in a non-IE browser (such
as Firefox), I found I could not use the object.property=value syntax.&amp;nbsp; Instead,
I had to use the SetAttribute() function.&amp;nbsp; Also, with Firefox, reassigning the
className was unnecessary.&lt;/font&gt;
&lt;/p&gt;
&lt;blockquote dir=ltr style="MARGIN-RIGHT: 0px"&gt; 
&lt;p&gt;
&lt;font face="Courier New"&gt;td.setAttribute("err", "0");&lt;/font&gt;
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p dir=ltr&gt;
&lt;font face=Tahoma&gt;That's probably the best way to handle it then, for cross-browser
compliance.&lt;/font&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.devstone.com/aaron/aggbug.ashx?id=b1532b74-f32c-4bfb-9943-294340251147" /&gt;</description>
      <comments>http://blog.devstone.com/aaron/CommentView,guid,b1532b74-f32c-4bfb-9943-294340251147.aspx</comments>
      <category>CSS</category>
      <category>Web</category>
    <feedburner:origLink>http://blog.devstone.com/aaron/2009/05/04/CSSAttributeSelectorMagic.aspx</feedburner:origLink></item>
    <item>
      <trackback:ping>http://blog.devstone.com/aaron/Trackback.aspx?guid=eb7b0741-d973-4dda-9325-1a4cf5f3fdfc</trackback:ping>
      <pingback:server>http://blog.devstone.com/aaron/pingback.aspx</pingback:server>
      <pingback:target>http://blog.devstone.com/aaron/PermaLink,guid,eb7b0741-d973-4dda-9325-1a4cf5f3fdfc.aspx</pingback:target>
      <dc:creator>R. Aaron Zupancic (Administrator)</dc:creator>
      <wfw:comment>http://blog.devstone.com/aaron/CommentView,guid,eb7b0741-d973-4dda-9325-1a4cf5f3fdfc.aspx</wfw:comment>
      <wfw:commentRss>http://blog.devstone.com/aaron/SyndicationService.asmx/GetEntryCommentsRss?guid=eb7b0741-d973-4dda-9325-1a4cf5f3fdfc</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <font face="Tahoma">My buddy Rob Bagby has announced this exciting event called <strong>XamlFest</strong> which
will be in Salt Lake City on May 1st.  If you have the chance, I'd encourage
you to sign up and attend.</font>
        </p>
        <p>
          <font face="Tahoma">Here's the info: </font>
          <a href="http://blogs.msdn.com/bags/archive/2009/03/31/xamlfest-in-salt-lake-city-on-may-1.aspx">
            <font face="Tahoma">http://blogs.msdn.com/bags/archive/2009/03/31/xamlfest-in-salt-lake-city-on-may-1.aspx</font>
          </a>
        </p>
        <img width="0" height="0" src="http://blog.devstone.com/aaron/aggbug.ashx?id=eb7b0741-d973-4dda-9325-1a4cf5f3fdfc" />
      </body>
      <title>XamlFest in SLC on May 1st</title>
      <guid isPermaLink="false">http://blog.devstone.com/aaron/PermaLink,guid,eb7b0741-d973-4dda-9325-1a4cf5f3fdfc.aspx</guid>
      <link>http://feedproxy.google.com/~r/ZupancicPerspective/~3/Y0ZV4NhY5ts/XamlFestInSLCOnMay1st.aspx</link>
      <pubDate>Thu, 23 Apr 2009 19:35:44 GMT</pubDate>
      <description>&lt;p&gt;
&lt;font face=Tahoma&gt;My buddy Rob Bagby has announced this exciting event called &lt;strong&gt;XamlFest&lt;/strong&gt; which
will be in Salt Lake City on May 1st.&amp;nbsp; If you have the chance, I'd encourage
you to sign up and attend.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face=Tahoma&gt;Here's the info: &lt;/font&gt;&lt;a href="http://blogs.msdn.com/bags/archive/2009/03/31/xamlfest-in-salt-lake-city-on-may-1.aspx"&gt;&lt;font face=Tahoma&gt;http://blogs.msdn.com/bags/archive/2009/03/31/xamlfest-in-salt-lake-city-on-may-1.aspx&lt;/font&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.devstone.com/aaron/aggbug.ashx?id=eb7b0741-d973-4dda-9325-1a4cf5f3fdfc" /&gt;</description>
      <comments>http://blog.devstone.com/aaron/CommentView,guid,eb7b0741-d973-4dda-9325-1a4cf5f3fdfc.aspx</comments>
      <category>Events</category>
    <feedburner:origLink>http://blog.devstone.com/aaron/2009/04/23/XamlFestInSLCOnMay1st.aspx</feedburner:origLink></item>
    <item>
      <trackback:ping>http://blog.devstone.com/aaron/Trackback.aspx?guid=994798c1-3e00-4b01-8807-6ed42fb0d446</trackback:ping>
      <pingback:server>http://blog.devstone.com/aaron/pingback.aspx</pingback:server>
      <pingback:target>http://blog.devstone.com/aaron/PermaLink,guid,994798c1-3e00-4b01-8807-6ed42fb0d446.aspx</pingback:target>
      <dc:creator>R. Aaron Zupancic (Administrator)</dc:creator>
      <wfw:comment>http://blog.devstone.com/aaron/CommentView,guid,994798c1-3e00-4b01-8807-6ed42fb0d446.aspx</wfw:comment>
      <wfw:commentRss>http://blog.devstone.com/aaron/SyndicationService.asmx/GetEntryCommentsRss?guid=994798c1-3e00-4b01-8807-6ed42fb0d446</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <font face="Tahoma">I was putting together a WinForms utility application today that
consists of a TabStrip control on the main dialog box.  On a themed system the
TabStrip displays a nice gradual gradient on the page.  As part of this
application I wanted to output statistical and detailed information about the user's
selections in a readonly fashion, but I wanted to have the text appear as though it
were written directly on the TabStrip page rather than within a control.</font>
        </p>
        <p>
          <font face="Tahoma">Of course my first thought was to use a Label control, but I almost
immediately wrote that off as the amount of information to be displayed was prohibitive
and variable.  The data being displayed might exceed the space on the TabStrip,
so scrolling the information is a must.</font>
        </p>
        <p>
          <font face="Tahoma">Next I thought of using a TextBox control, but without some pretty
intense subclassing and overriding, I wouldn't be able to achieve the 'written-on'
look I was after.  The TextBox will always render an opaque background color. 
Sure, there are ways of faking transparency, like overriding TextBox and adding a
PictureBox and telling the parent control to WM_PRINT into it, but that seems to be
a kludgy way of getting the results I wanted.</font>
        </p>
        <p>
          <font face="Tahoma">Additionally, there are mechanisms to use a RichTextBox (v5.0)
to achieve transparency that are well documented online, but try as I might with these
implementations, I found them to be quite buggy.  In particular, the appearance
of the scrollbars was erratic and sometimes didn't render properly with the control
was resized.  After battling with it for a few hours I gave up.  It wasn't
for lack of desire, it just wasn't worth it given the scope of the project I was working
on.</font>
        </p>
        <p>
          <font face="Tahoma">So this morning I went back to the drawing board and came up with
a solution in about 45 minutes that seems to do exactly what I wanted.  I've
called this control the ScrollableLabel.  Essentially, it offers the readonlyness
of a Label control and the scrollability of a TextBox.  This implementation here
is very fundamental.  I plan on enhancing it some more to incorporate user-defined
colors, headers, and much more.</font>
        </p>
        <p>
          <font face="Tahoma">I made some executive decisions about how this control should
render.  For instance, it will always use your system's colors for text and I
set the BackColor property of the UserControl to Transparent via the designer. 
For both of these I plan on making them user-selectable choices, but for not,
they're the look I was after.</font>
        </p>
        <blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
          <p>
            <font face="Courier New">
              <font color="#008000">public partial class</font> ScrollableLabel
: UserControl {<br />
   <font color="#008000">public</font> ScrollableLabel() {<br />
      InitializeComponent();<br />
      SetStyle(ControlStyles.Selectable, <font color="#008000">false</font>);<br />
      <em><font color="#a9a9a9">// the preferred mechanism
for enabling double-buffering is to set the DoubleBuffered property<br />
      // of the control rather than the equivalent SetStyle(DoubleBuffer
| UserPaint | AllPaintingInWmPaint, true).<br /></font></em>      DoubleBuffered = <font color="#008000">true</font>;<br />
      AutoScroll = <font color="#008000">true</font>;<br />
      AutoScrollMinSize = Size.Empty;<br />
   }<br /><br />
   <font color="#008000">private</font> SizeF _actualTextSize;<br /><br />
   <font color="#008000">public override string</font> Text {<br />
      <font color="#008000">get</font> { <font color="#008000">return
base</font>.Text; }<br />
      <font color="#008000">set</font> {<br />
         <font color="#008000">base</font>.Text
= <font color="#008000">value</font>;<br />
         calcLabelDimensions();<br />
         Invalidate();<br />
      }<br />
   }<br /><br />
   <font color="#008000">protected override void</font> OnScroll(ScrollEventArgs
se) {<br />
      <font color="#008000">base</font>.OnScroll(se);<br />
      Invalidate();<br />
   }<br /><br />
   <font color="#008000">public void</font> Clear() {<br />
      Text = <font color="#008000">string</font>.Empty;<br />
   }<br /><br />
   <font color="#008000">#region Hidden design-time properties</font><br />
   [Browsable(<font color="#008000">false</font>)]<br />
   <font color="#008000">public override bool</font> AutoScroll {<br />
      <font color="#008000">get</font> { <font color="#008000">return
true</font>; }<br />
      <font color="#008000">set</font> { <font color="#a9a9a9"><em>/*
do nothing for now; control is always AutoScroll */</em></font> }<br />
   }</font>
          </p>
          <p>
            <br />
            <font face="Courier New">   [Browsable(<font color="#008000">false</font>)]<br />
   <font color="#008000">public override</font> Color ForeColor {<br />
      <font color="#008000">get</font> { <font color="#008000">return</font> SystemColors.ControlText;
}<br />
      <font color="#008000">set</font> { <em><font color="#a9a9a9">/*
do nothing for now; only ControlText is currently supported */</font></em> }<br />
   }<br />
   <font color="#008000">#endregion</font><br /><br />
   <font color="#008000">private void</font> calcLabelDimensions() {<br />
      <font color="#008000">using</font> ( Graphics g = CreateGraphics()
) {<br />
         <em><font color="#a9a9a9">// assume
that no text should wrap</font></em><br />
         _actualTextSize = g.MeasureString(Text,
Font);<br />
         AutoScrollMinSize = Size.Round(_actualTextSize);<br />
      }<br />
   }<br /><br />
   <font color="#008000">protected override void</font> OnPaint(PaintEventArgs
e) {<br />
      RectangleF rct = <font color="#008000">new</font> RectangleF(AutoScrollPosition,
_actualTextSize);<br />
      </font>
            <font face="Courier New">Brush br = Enabled<br />
                   
? SystemBrushes.ControlText<br />
                   
: SystemBrushes.GrayText;<br />
      e.Graphics.DrawString(Text, Font, br, rct);<br />
   }<br />
}</font>
          </p>
        </blockquote>
        <p>
          <font face="Tahoma">When this control is added to a Form it will automatically add
scrollbars if the contents exceed the dimensions of the control.  At design-time,
however I wanted to make sure that I could see where the ScrollableLabel was positioned
so I created a simple Designer.</font>
        </p>
        <blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
          <p>
            <font face="Courier New">
              <font color="#008000">public sealed class</font> BorderlessBorderDesigner
: ControlDesigner {<br />
   <font color="#008000">protected override void</font> OnPaintAdornments(PaintEventArgs
pe) {<br />
      <font color="#008000">base</font>.OnPaintAdornments(pe);<br />
      <font color="#008000">if</font> ( BorderStyle.None
== getBorderStyle() ) {<br />
         Rectangle rct = Control.ClientRectangle;<br />
         rct.Width -= 1;<br />
         rct.Height -= 1;<br />
         <font color="#008000">using</font> (
Pen p = <font color="#008000">new</font> Pen(SystemColors.ControlDark) ) {<br />
            p.DashStyle = DashStyle.Dash;<br />
            pe.Graphics.DrawRectangle(p,
rct);<br />
         }<br />
      }<br />
   }<br /></font>
            <font face="Tahoma">
              <br />
              <font face="Courier New">   <font color="#008000">private</font> BorderStyle
getBorderStyle() {<br /></font>
              <font face="Courier New">      UserControl ctl = Control <font color="#008000">as</font> UserControl;<br />
      <font color="#008000">if</font> ( <font color="#008000">null</font> !=
ctl ) <font color="#008000">return</font> ctl.BorderStyle;<br /></font>
              <font face="Courier New">      <font color="#008000">return</font> BorderStyle.None;<br />
   }<br />
}</font>
            </font>
          </p>
        </blockquote>
        <p>
Then, I added<strong> [Designer(typeof(BorderlessBorderDesigner)]</strong> to my ScrollableLabel
class declaration.
</p>
        <p>
It's a simple control that achieves a simple goal.  I'll post my updates to it
as I get a chance to modify it and make it all the more flexible and powerful.
</p>
        <p>
Enjoy!
</p>
        <img width="0" height="0" src="http://blog.devstone.com/aaron/aggbug.ashx?id=994798c1-3e00-4b01-8807-6ed42fb0d446" />
      </body>
      <title>ScrollableLabel control</title>
      <guid isPermaLink="false">http://blog.devstone.com/aaron/PermaLink,guid,994798c1-3e00-4b01-8807-6ed42fb0d446.aspx</guid>
      <link>http://feedproxy.google.com/~r/ZupancicPerspective/~3/kiN8SUO2OJA/ScrollableLabelControl.aspx</link>
      <pubDate>Tue, 07 Apr 2009 04:19:13 GMT</pubDate>
      <description>&lt;p&gt;
&lt;font face=Tahoma&gt;I was putting together a WinForms utility application today that
consists of a TabStrip control on the main dialog box.&amp;nbsp; On a themed system the
TabStrip displays a nice gradual gradient on the page.&amp;nbsp;&amp;nbsp;As part of this
application I wanted to output statistical and detailed information about the user's
selections in a readonly fashion, but I wanted to have the text appear as though it
were written directly on the TabStrip page rather than within a control.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face=Tahoma&gt;Of course my first thought was to use a Label control, but I almost
immediately wrote that off as the amount of information to be displayed was prohibitive
and variable.&amp;nbsp; The data being displayed might exceed the space on the TabStrip,
so scrolling the information is a must.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face=Tahoma&gt;Next I thought of using a TextBox control, but without some pretty
intense subclassing and overriding, I wouldn't be able to achieve the 'written-on'
look I was after.&amp;nbsp; The TextBox will always render an opaque background color.&amp;nbsp;
Sure, there are ways of faking transparency, like overriding TextBox and adding a
PictureBox and telling the parent control to WM_PRINT into it, but that seems to be
a kludgy way of getting the results I wanted.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face=Tahoma&gt;Additionally, there are mechanisms to use a RichTextBox (v5.0) to
achieve transparency that are well documented online, but try as I might with these
implementations, I found them to be quite buggy.&amp;nbsp; In particular, the appearance
of the scrollbars was erratic and sometimes didn't render properly with the control
was resized.&amp;nbsp; After battling with it for a few hours I gave up.&amp;nbsp; It wasn't
for lack of desire, it just wasn't worth it given the scope of the project I was working
on.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face=Tahoma&gt;So this morning I went back to the drawing board and came up with
a solution in about 45 minutes that seems to do exactly what I wanted.&amp;nbsp; I've
called this control the ScrollableLabel.&amp;nbsp; Essentially, it offers the readonlyness
of a Label control and the scrollability of a TextBox.&amp;nbsp; This implementation here
is very fundamental.&amp;nbsp; I plan on enhancing it some more to incorporate user-defined
colors, headers, and much more.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face=Tahoma&gt;I made some executive decisions about how this control should render.&amp;nbsp;
For instance, it will always use your system's colors for text and I set the BackColor
property of the UserControl to Transparent via the designer.&amp;nbsp; For both of these
I plan on making&amp;nbsp;them user-selectable choices, but for not, they're the look
I was after.&lt;/font&gt;
&lt;/p&gt;
&lt;blockquote dir=ltr style="MARGIN-RIGHT: 0px"&gt; 
&lt;p&gt;
&lt;font face="Courier New"&gt;&lt;font color=#008000&gt;public partial class&lt;/font&gt; ScrollableLabel
: UserControl {&lt;br&gt;
&amp;nbsp;&amp;nbsp; &lt;font color=#008000&gt;public&lt;/font&gt; ScrollableLabel() {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; InitializeComponent();&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SetStyle(ControlStyles.Selectable, &lt;font color=#008000&gt;false&lt;/font&gt;);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;em&gt;&lt;font color=#a9a9a9&gt;// the preferred mechanism
for enabling double-buffering is to set the DoubleBuffered property&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // of the control rather than the equivalent SetStyle(DoubleBuffer
| UserPaint | AllPaintingInWmPaint, true).&lt;br&gt;
&lt;/font&gt;&lt;/em&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DoubleBuffered = &lt;font color=#008000&gt;true&lt;/font&gt;;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AutoScroll = &lt;font color=#008000&gt;true&lt;/font&gt;;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AutoScrollMinSize = Size.Empty;&lt;br&gt;
&amp;nbsp;&amp;nbsp; }&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp; &lt;font color=#008000&gt;private&lt;/font&gt; SizeF _actualTextSize;&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp; &lt;font color=#008000&gt;public override string&lt;/font&gt; Text {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color=#008000&gt;get&lt;/font&gt; { &lt;font color=#008000&gt;return
base&lt;/font&gt;.Text; }&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color=#008000&gt;set&lt;/font&gt; {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color=#008000&gt;base&lt;/font&gt;.Text
= &lt;font color=#008000&gt;value&lt;/font&gt;;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; calcLabelDimensions();&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Invalidate();&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;
&amp;nbsp;&amp;nbsp; }&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp; &lt;font color=#008000&gt;protected override void&lt;/font&gt; OnScroll(ScrollEventArgs
se) {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color=#008000&gt;base&lt;/font&gt;.OnScroll(se);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Invalidate();&lt;br&gt;
&amp;nbsp;&amp;nbsp; }&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp; &lt;font color=#008000&gt;public void&lt;/font&gt; Clear() {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Text = &lt;font color=#008000&gt;string&lt;/font&gt;.Empty;&lt;br&gt;
&amp;nbsp;&amp;nbsp; }&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp; &lt;font color=#008000&gt;#region Hidden design-time properties&lt;/font&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp; [Browsable(&lt;font color=#008000&gt;false&lt;/font&gt;)]&lt;br&gt;
&amp;nbsp;&amp;nbsp; &lt;font color=#008000&gt;public override bool&lt;/font&gt; AutoScroll {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color=#008000&gt;get&lt;/font&gt; { &lt;font color=#008000&gt;return
true&lt;/font&gt;; }&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color=#008000&gt;set&lt;/font&gt; { &lt;font color=#a9a9a9&gt;&lt;em&gt;/*
do nothing for now; control is always AutoScroll */&lt;/em&gt;&lt;/font&gt; }&lt;br&gt;
&amp;nbsp;&amp;nbsp; }&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;br&gt;
&lt;font face="Courier New"&gt;&amp;nbsp;&amp;nbsp; [Browsable(&lt;font color=#008000&gt;false&lt;/font&gt;)]&lt;br&gt;
&amp;nbsp;&amp;nbsp; &lt;font color=#008000&gt;public override&lt;/font&gt; Color ForeColor {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color=#008000&gt;get&lt;/font&gt; { &lt;font color=#008000&gt;return&lt;/font&gt; SystemColors.ControlText;
}&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color=#008000&gt;set&lt;/font&gt; { &lt;em&gt;&lt;font color=#a9a9a9&gt;/*
do nothing for now; only ControlText is currently supported */&lt;/font&gt;&lt;/em&gt; }&lt;br&gt;
&amp;nbsp;&amp;nbsp; }&lt;br&gt;
&amp;nbsp;&amp;nbsp; &lt;font color=#008000&gt;#endregion&lt;/font&gt;
&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp; &lt;font color=#008000&gt;private void&lt;/font&gt; calcLabelDimensions() {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color=#008000&gt;using&lt;/font&gt; ( Graphics g = CreateGraphics()
) {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;em&gt;&lt;font color=#a9a9a9&gt;// assume
that no text should wrap&lt;/font&gt;&lt;/em&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _actualTextSize = g.MeasureString(Text,
Font);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AutoScrollMinSize = Size.Round(_actualTextSize);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;
&amp;nbsp;&amp;nbsp; }&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp; &lt;font color=#008000&gt;protected override void&lt;/font&gt; OnPaint(PaintEventArgs
e) {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RectangleF rct = &lt;font color=#008000&gt;new&lt;/font&gt; RectangleF(AutoScrollPosition,
_actualTextSize);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;font face="Courier New"&gt;Brush br = Enabled&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
? SystemBrushes.ControlText&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
: SystemBrushes.GrayText;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; e.Graphics.DrawString(Text, Font, br, rct);&lt;br&gt;
&amp;nbsp;&amp;nbsp; }&lt;br&gt;
}&lt;/font&gt;
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
&lt;font face=Tahoma&gt;When this control is added to a Form it will automatically add scrollbars
if the contents exceed the dimensions of the control.&amp;nbsp; At design-time, however
I wanted to make sure that I could see where the ScrollableLabel was positioned so
I created a simple Designer.&lt;/font&gt;
&lt;/p&gt;
&lt;blockquote dir=ltr style="MARGIN-RIGHT: 0px"&gt; 
&lt;p&gt;
&lt;font face="Courier New"&gt;&lt;font color=#008000&gt;public sealed class&lt;/font&gt; BorderlessBorderDesigner
: ControlDesigner {&lt;br&gt;
&amp;nbsp;&amp;nbsp; &lt;font color=#008000&gt;protected override void&lt;/font&gt; OnPaintAdornments(PaintEventArgs
pe) {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color=#008000&gt;base&lt;/font&gt;.OnPaintAdornments(pe);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color=#008000&gt;if&lt;/font&gt; ( BorderStyle.None ==
getBorderStyle() ) {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Rectangle rct = Control.ClientRectangle;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rct.Width -= 1;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rct.Height -= 1;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color=#008000&gt;using&lt;/font&gt; (
Pen p = &lt;font color=#008000&gt;new&lt;/font&gt; Pen(SystemColors.ControlDark) ) {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; p.DashStyle = DashStyle.Dash;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pe.Graphics.DrawRectangle(p,
rct);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;
&amp;nbsp;&amp;nbsp; }&lt;br&gt;
&lt;/font&gt;&lt;font face=Tahoma&gt;
&lt;br&gt;
&lt;font face="Courier New"&gt;&amp;nbsp;&amp;nbsp; &lt;font color=#008000&gt;private&lt;/font&gt; BorderStyle
getBorderStyle() {&lt;br&gt;
&lt;/font&gt;&lt;font face="Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; UserControl ctl = Control &lt;font color=#008000&gt;as&lt;/font&gt; UserControl;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color=#008000&gt;if&lt;/font&gt; ( &lt;font color=#008000&gt;null&lt;/font&gt; !=
ctl ) &lt;font color=#008000&gt;return&lt;/font&gt; ctl.BorderStyle;&lt;br&gt;
&lt;/font&gt;&lt;font face="Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color=#008000&gt;return&lt;/font&gt; BorderStyle.None;&lt;br&gt;
&amp;nbsp;&amp;nbsp; }&lt;br&gt;
}&lt;/font&gt;
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
Then, I added&lt;strong&gt; [Designer(typeof(BorderlessBorderDesigner)]&lt;/strong&gt; to my ScrollableLabel
class&amp;nbsp;declaration.
&lt;/p&gt;
&lt;p&gt;
It's a simple control that achieves a simple goal.&amp;nbsp; I'll post my updates to it
as I get a chance to modify it and make it all the more flexible and powerful.
&lt;/p&gt;
&lt;p&gt;
Enjoy!&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.devstone.com/aaron/aggbug.ashx?id=994798c1-3e00-4b01-8807-6ed42fb0d446" /&gt;</description>
      <comments>http://blog.devstone.com/aaron/CommentView,guid,994798c1-3e00-4b01-8807-6ed42fb0d446.aspx</comments>
      <category>.NET</category>
      <category>C#</category>
      <category>WinForms</category>
      <category>Controls</category>
    <feedburner:origLink>http://blog.devstone.com/aaron/2009/04/07/ScrollableLabelControl.aspx</feedburner:origLink></item>
    <item>
      <trackback:ping>http://blog.devstone.com/aaron/Trackback.aspx?guid=fb1bbf27-9f81-4a3d-b600-456291ac6711</trackback:ping>
      <pingback:server>http://blog.devstone.com/aaron/pingback.aspx</pingback:server>
      <pingback:target>http://blog.devstone.com/aaron/PermaLink,guid,fb1bbf27-9f81-4a3d-b600-456291ac6711.aspx</pingback:target>
      <dc:creator>R. Aaron Zupancic (Administrator)</dc:creator>
      <wfw:comment>http://blog.devstone.com/aaron/CommentView,guid,fb1bbf27-9f81-4a3d-b600-456291ac6711.aspx</wfw:comment>
      <wfw:commentRss>http://blog.devstone.com/aaron/SyndicationService.asmx/GetEntryCommentsRss?guid=fb1bbf27-9f81-4a3d-b600-456291ac6711</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <font face="Tahoma">I have an external HDD that I use to store various files and products
that I download.  Today, while downloading one such application my computer decided
to freeze.  I've been having a sporatic issue with my hardware lately, so this
freeze (while not entirely unexpected) happened at a most inopportune moment.</font>
        </p>
        <p>
          <font face="Tahoma">When my computer 'came-to' after rebooting, my HDD was put into
a read-only state.  Any change I tried to make to the drive was greeted with
a "The media is write protected" error message.  The only <em>fix</em> I could
come up with was the following:</font>
        </p>
        <blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
          <p>
            <font face="Tahoma">1. Open the command prompt.<br />
2. Type <strong>DISKPART</strong><br />
3. <strong>LIST VOLUME</strong> (to identify the volume in question)<br />
4. <strong>SELECT VOLUME #</strong> (where # represents the volume identifier)<br />
5. <strong>ATTRIBUTES VOLUME CLEAR READONLY</strong></font>
          </p>
        </blockquote>
        <p>
          <font face="Tahoma">After this, I could select the folders on my drive and unmark
their read-only state.  Note that I had to clear the read-only flag even
though DISKPART reported the volume as not being read-only.</font>
        </p>
        <p>
          <font face="Tahoma">We'll see whether the drive falls back into its read-only state
in the future.</font>
        </p>
        <img width="0" height="0" src="http://blog.devstone.com/aaron/aggbug.ashx?id=fb1bbf27-9f81-4a3d-b600-456291ac6711" />
      </body>
      <title>Working through "The media is write protected"</title>
      <guid isPermaLink="false">http://blog.devstone.com/aaron/PermaLink,guid,fb1bbf27-9f81-4a3d-b600-456291ac6711.aspx</guid>
      <link>http://feedproxy.google.com/~r/ZupancicPerspective/~3/uzpRAw_G-Jk/WorkingThroughTheMediaIsWriteProtected.aspx</link>
      <pubDate>Tue, 17 Mar 2009 23:31:52 GMT</pubDate>
      <description>&lt;p&gt;
&lt;font face=Tahoma&gt;I have an external HDD that I use to store various files and products
that I download.&amp;nbsp; Today, while downloading one such application my computer decided
to freeze.&amp;nbsp; I've been having a sporatic issue with my hardware lately, so this
freeze (while not entirely unexpected) happened at a most inopportune moment.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face=Tahoma&gt;When my computer 'came-to' after rebooting, my HDD was put into
a read-only state.&amp;nbsp; Any change I tried to make to the drive was greeted with
a "The media is write protected" error message.&amp;nbsp; The only &lt;em&gt;fix&lt;/em&gt; I could
come up with was the following:&lt;/font&gt;
&lt;/p&gt;
&lt;blockquote dir=ltr style="MARGIN-RIGHT: 0px"&gt; 
&lt;p&gt;
&lt;font face=Tahoma&gt;1. Open the command prompt.&lt;br&gt;
2. Type &lt;strong&gt;DISKPART&lt;/strong&gt;
&lt;br&gt;
3. &lt;strong&gt;LIST VOLUME&lt;/strong&gt; (to identify the volume in question)&lt;br&gt;
4. &lt;strong&gt;SELECT VOLUME #&lt;/strong&gt; (where # represents the volume identifier)&lt;br&gt;
5. &lt;strong&gt;ATTRIBUTES VOLUME CLEAR READONLY&lt;/strong&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
&lt;font face=Tahoma&gt;After this, I could select the folders on my drive and unmark their
read-only state.&amp;nbsp; Note that I had to clear the read-only&amp;nbsp;flag even though
DISKPART reported the volume as not being read-only.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face=Tahoma&gt;We'll see whether the drive falls back into its read-only state
in the future.&lt;/font&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.devstone.com/aaron/aggbug.ashx?id=fb1bbf27-9f81-4a3d-b600-456291ac6711" /&gt;</description>
      <comments>http://blog.devstone.com/aaron/CommentView,guid,fb1bbf27-9f81-4a3d-b600-456291ac6711.aspx</comments>
      <category>Utilities</category>
      <category>Windows Vista</category>
    <feedburner:origLink>http://blog.devstone.com/aaron/2009/03/17/WorkingThroughTheMediaIsWriteProtected.aspx</feedburner:origLink></item>
    <item>
      <trackback:ping>http://blog.devstone.com/aaron/Trackback.aspx?guid=81ef7512-4e8d-463f-9acf-12268085a723</trackback:ping>
      <pingback:server>http://blog.devstone.com/aaron/pingback.aspx</pingback:server>
      <pingback:target>http://blog.devstone.com/aaron/PermaLink,guid,81ef7512-4e8d-463f-9acf-12268085a723.aspx</pingback:target>
      <dc:creator>R. Aaron Zupancic (Administrator)</dc:creator>
      <wfw:comment>http://blog.devstone.com/aaron/CommentView,guid,81ef7512-4e8d-463f-9acf-12268085a723.aspx</wfw:comment>
      <wfw:commentRss>http://blog.devstone.com/aaron/SyndicationService.asmx/GetEntryCommentsRss?guid=81ef7512-4e8d-463f-9acf-12268085a723</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <font face="Tahoma">Years ago I created an InstallShield (InstallScript) installer
for some software that I've maintained over the years.  While the installer has
been run countless times (successfully, I might add), I recently witnessed the following
error message:</font>
        </p>
        <blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
          <p>
            <font face="Courier New">An error (-5006 : 0x80070002) has occurred while running
the setup.</font>
          </p>
          <p>
            <font face="Courier New">Please make sure that you have finished any previous setup
and closed other applications.</font>
          </p>
        </blockquote>
        <p>
          <font face="Tahoma">This usually happens after installing a related, but completely
stand-alone and distinct product.  After a reboot (having supposed that the previous
setup didn't completely finish) we get the same error message.  It turns out,
that the error would occur whether or not the previous application had been installed.</font>
        </p>
        <p>
          <font face="Tahoma">Well, long story story short, I figured out that the reason this
error message was cropping up was because the software was being installed on a Terminal
Server.  In order to install some (not all) software on a Terminal Server, you
must first put the server in Install mode, then run the installer (via the Control
Panel), and then put the server back into its default Execute mode:</font>
        </p>
        <blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
          <p>
            <font face="Tahoma">1. From the Command Prompt, type the following command:  <strong>change
user /install</strong>.<br />
2. Install the software via Add/Remove Programs in the Control Panel.<br />
3. When complete, type <strong>change user /execute</strong> from the command prompt.</font>
          </p>
        </blockquote>
        <p>
          <font face="Tahoma">While I'm not a systems guy, this leads me to wonder why I had
to do this for my installer (which I wrote with InstallScript) but I don't for other
installers.  Perhaps there's a switch I can set or a script I can invoke that
will do this automatically?  I must investigate.</font>
        </p>
        <img width="0" height="0" src="http://blog.devstone.com/aaron/aggbug.ashx?id=81ef7512-4e8d-463f-9acf-12268085a723" />
      </body>
      <title>Installing Software on a Terminal Server</title>
      <guid isPermaLink="false">http://blog.devstone.com/aaron/PermaLink,guid,81ef7512-4e8d-463f-9acf-12268085a723.aspx</guid>
      <link>http://feedproxy.google.com/~r/ZupancicPerspective/~3/-kYdN7FF_tE/InstallingSoftwareOnATerminalServer.aspx</link>
      <pubDate>Tue, 17 Feb 2009 16:47:23 GMT</pubDate>
      <description>&lt;p&gt;
&lt;font face=Tahoma&gt;Years ago I created an InstallShield (InstallScript)&amp;nbsp;installer
for some software that I've maintained over the years.&amp;nbsp; While the installer has
been run countless times (successfully, I might add), I recently witnessed the&amp;nbsp;following
error message:&lt;/font&gt;
&lt;/p&gt;
&lt;blockquote dir=ltr style="MARGIN-RIGHT: 0px"&gt; 
&lt;p&gt;
&lt;font face="Courier New"&gt;An error (-5006 : 0x80070002) has occurred while running
the setup.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;Please make sure that you have finished any previous setup
and closed other applications.&lt;/font&gt;
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
&lt;font face=Tahoma&gt;This usually happens after installing a related, but completely
stand-alone and distinct product.&amp;nbsp; After a reboot (having supposed that the previous
setup didn't completely finish) we get the same error message.&amp;nbsp; It turns out,
that the error would occur whether or not the previous application had been installed.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face=Tahoma&gt;Well, long story story short, I figured out that the reason this
error message was cropping up was because the software was being installed on a Terminal
Server.&amp;nbsp; In order to install some (not all) software on a Terminal Server, you
must first put the server in Install mode, then run the installer (via the Control
Panel), and then put the server back into its default Execute mode:&lt;/font&gt;
&lt;/p&gt;
&lt;blockquote dir=ltr style="MARGIN-RIGHT: 0px"&gt; 
&lt;p&gt;
&lt;font face=Tahoma&gt;1. From the Command Prompt, type the following command:&amp;nbsp; &lt;strong&gt;change
user /install&lt;/strong&gt;.&lt;br&gt;
2. Install the software via Add/Remove Programs in the Control Panel.&lt;br&gt;
3. When complete, type &lt;strong&gt;change user /execute&lt;/strong&gt; from the command prompt.&lt;/font&gt;
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
&lt;font face=Tahoma&gt;While I'm not a systems guy, this leads me to wonder why I had to
do this for my installer (which I wrote with InstallScript) but I don't for other
installers.&amp;nbsp; Perhaps there's a switch I can set or a script I can invoke that
will do this automatically?&amp;nbsp; I must investigate.&lt;/font&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.devstone.com/aaron/aggbug.ashx?id=81ef7512-4e8d-463f-9acf-12268085a723" /&gt;</description>
      <comments>http://blog.devstone.com/aaron/CommentView,guid,81ef7512-4e8d-463f-9acf-12268085a723.aspx</comments>
      <category>Installation</category>
    <feedburner:origLink>http://blog.devstone.com/aaron/2009/02/17/InstallingSoftwareOnATerminalServer.aspx</feedburner:origLink></item>
    <item>
      <trackback:ping>http://blog.devstone.com/aaron/Trackback.aspx?guid=3ca7c19a-e909-42bc-b2f1-eaa54a578493</trackback:ping>
      <pingback:server>http://blog.devstone.com/aaron/pingback.aspx</pingback:server>
      <pingback:target>http://blog.devstone.com/aaron/PermaLink,guid,3ca7c19a-e909-42bc-b2f1-eaa54a578493.aspx</pingback:target>
      <dc:creator>R. Aaron Zupancic (Administrator)</dc:creator>
      <wfw:comment>http://blog.devstone.com/aaron/CommentView,guid,3ca7c19a-e909-42bc-b2f1-eaa54a578493.aspx</wfw:comment>
      <wfw:commentRss>http://blog.devstone.com/aaron/SyndicationService.asmx/GetEntryCommentsRss?guid=3ca7c19a-e909-42bc-b2f1-eaa54a578493</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <font face="Tahoma">In my development environment, I like to use SQL Express rather
than the full-featured SQL Server editions mostly because its physical and memory
footprints are smaller and its background processing is lighter, but also for
support of User Instances.  I don't like to have a bunch of extraneous things
running in the background that I'll rarely, if ever, use.  Using SQL Express,
however, does come at a price.  There are a few features of SQL Server that don't
get installed with it, most notably the SQL Profiler.</font>
        </p>
        <p>
          <font face="Tahoma">If you're like me and want to use SQL Express in development but
also need the diagnostic tools like the Profiler, you <em>can</em> make it work.</font>
        </p>
        <ol>
          <li>
            <font face="Tahoma">If you already have SQL Express installed, uninstall it and all
SQL Express-related items.</font>
          </li>
          <li>
            <font face="Tahoma">From the SQL Server disc, install just the <strong>Management
Tools - Basic</strong> and <strong>Management Tools - Complete</strong>.  If
you need other features like Integration Services, Notification Services, etc, you'll
need to install them now as well.</font>
          </li>
          <li>
            <font face="Tahoma">Install SQL Express.</font>
          </li>
        </ol>
        <p>
          <font face="Tahoma">That's all there is to it.  All you need to remember is to
install the Management Tools from the SQL Server discs first and you should be good
to go! :)</font>
        </p>
        <img width="0" height="0" src="http://blog.devstone.com/aaron/aggbug.ashx?id=3ca7c19a-e909-42bc-b2f1-eaa54a578493" />
      </body>
      <title>SQL Profiler in SQL Express</title>
      <guid isPermaLink="false">http://blog.devstone.com/aaron/PermaLink,guid,3ca7c19a-e909-42bc-b2f1-eaa54a578493.aspx</guid>
      <link>http://feedproxy.google.com/~r/ZupancicPerspective/~3/cXFHKaqXaVo/SQLProfilerInSQLExpress.aspx</link>
      <pubDate>Thu, 12 Feb 2009 22:29:07 GMT</pubDate>
      <description>&lt;p&gt;
&lt;font face=Tahoma&gt;In my development environment, I like to use SQL Express rather
than the full-featured SQL Server editions mostly because its physical and memory
footprints are smaller&amp;nbsp;and its background processing is lighter, but also for
support of User Instances.&amp;nbsp; I don't like to have a bunch of extraneous things
running in the background that I'll rarely, if ever, use.&amp;nbsp; Using SQL Express,
however, does come at a price.&amp;nbsp; There are a few features of SQL Server that don't
get installed with it, most notably the SQL Profiler.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face=Tahoma&gt;If you're like me and want to use SQL Express in development but
also need the diagnostic tools like the Profiler, you &lt;em&gt;can&lt;/em&gt; make it work.&lt;/font&gt;
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;font face=Tahoma&gt;If you already have SQL Express installed, uninstall it and all
SQL Express-related items.&lt;/font&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;font face=Tahoma&gt;From the SQL Server disc, install just the &lt;strong&gt;Management Tools
- Basic&lt;/strong&gt; and &lt;strong&gt;Management Tools - Complete&lt;/strong&gt;.&amp;nbsp; If you need
other features like Integration Services, Notification Services, etc, you'll need
to install them now as well.&lt;/font&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;font face=Tahoma&gt;Install SQL Express.&lt;/font&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
&lt;font face=Tahoma&gt;That's all there is to it.&amp;nbsp; All you need to remember is to
install the Management Tools from the SQL Server discs first and you should be good
to go! :)&lt;/font&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.devstone.com/aaron/aggbug.ashx?id=3ca7c19a-e909-42bc-b2f1-eaa54a578493" /&gt;</description>
      <comments>http://blog.devstone.com/aaron/CommentView,guid,3ca7c19a-e909-42bc-b2f1-eaa54a578493.aspx</comments>
      <category>Database</category>
      <category>SQL Server</category>
    <feedburner:origLink>http://blog.devstone.com/aaron/2009/02/12/SQLProfilerInSQLExpress.aspx</feedburner:origLink></item>
    <item>
      <trackback:ping>http://blog.devstone.com/aaron/Trackback.aspx?guid=a7134b68-50ae-4e41-8fea-e2424ad2aecd</trackback:ping>
      <pingback:server>http://blog.devstone.com/aaron/pingback.aspx</pingback:server>
      <pingback:target>http://blog.devstone.com/aaron/PermaLink,guid,a7134b68-50ae-4e41-8fea-e2424ad2aecd.aspx</pingback:target>
      <dc:creator>R. Aaron Zupancic (Administrator)</dc:creator>
      <wfw:comment>http://blog.devstone.com/aaron/CommentView,guid,a7134b68-50ae-4e41-8fea-e2424ad2aecd.aspx</wfw:comment>
      <wfw:commentRss>http://blog.devstone.com/aaron/SyndicationService.asmx/GetEntryCommentsRss?guid=a7134b68-50ae-4e41-8fea-e2424ad2aecd</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <font face="Tahoma">Come join us tonight at the <a href="http://www.utahdnug.org/">Utah
.NET User Group</a> meeting.  We're excited to have Mike Erickson come and talk
to us about the up-and-coming Visual Studio 2010.</font>
        </p>
        <blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
          <p>
            <font face="Tahoma">
              <strong>Date</strong>: Tonight, Thursday, February 12th, 2009<br /><strong>Time</strong>: 6:00 PM<br /><strong>Place</strong>: Neumont University 3rd Floor (10701 South River Front Parkway,
South Jordan, UT)</font>
          </p>
        </blockquote>
        <p>
          <font face="Tahoma">We are pleased to have <a href="http://www.teksystems.com/">TEKSystems</a> sponsor
this month's meeting.</font>
        </p>
        <p>
          <font face="Tahoma">Also, don't forget that we gather after the meeting for fun, food,
and friendship at the neighboring Denny's after the meeting.  Please set aside
the time and join us!  See you there :)</font>
        </p>
        <img width="0" height="0" src="http://blog.devstone.com/aaron/aggbug.ashx?id=a7134b68-50ae-4e41-8fea-e2424ad2aecd" />
      </body>
      <title>Utah .NET User Group February 12th, 2009 - Visual Studio 2010</title>
      <guid isPermaLink="false">http://blog.devstone.com/aaron/PermaLink,guid,a7134b68-50ae-4e41-8fea-e2424ad2aecd.aspx</guid>
      <link>http://feedproxy.google.com/~r/ZupancicPerspective/~3/vpcMDN3h_Xc/UtahNETUserGroupFebruary12th2009VisualStudio2010.aspx</link>
      <pubDate>Thu, 12 Feb 2009 18:46:02 GMT</pubDate>
      <description>&lt;p&gt;
&lt;font face=Tahoma&gt;Come join us tonight at the &lt;a href="http://www.utahdnug.org/"&gt;Utah
.NET User Group&lt;/a&gt; meeting.&amp;nbsp; We're excited to have Mike Erickson come and talk
to us about the up-and-coming Visual Studio 2010.&lt;/font&gt;
&lt;/p&gt;
&lt;blockquote dir=ltr style="MARGIN-RIGHT: 0px"&gt; 
&lt;p&gt;
&lt;font face=Tahoma&gt;&lt;strong&gt;Date&lt;/strong&gt;: Tonight, Thursday, February 12th, 2009&lt;br&gt;
&lt;strong&gt;Time&lt;/strong&gt;: 6:00 PM&lt;br&gt;
&lt;strong&gt;Place&lt;/strong&gt;: Neumont University 3rd Floor (10701 South River Front Parkway,
South Jordan, UT)&lt;/font&gt;
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
&lt;font face=Tahoma&gt;We are pleased to have &lt;a href="http://www.teksystems.com/"&gt;TEKSystems&lt;/a&gt; sponsor
this month's meeting.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face=Tahoma&gt;Also, don't forget that we gather after the meeting for fun, food,
and friendship at the neighboring Denny's after the meeting.&amp;nbsp; Please set aside
the time and join us!&amp;nbsp; See you there :)&lt;/font&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.devstone.com/aaron/aggbug.ashx?id=a7134b68-50ae-4e41-8fea-e2424ad2aecd" /&gt;</description>
      <comments>http://blog.devstone.com/aaron/CommentView,guid,a7134b68-50ae-4e41-8fea-e2424ad2aecd.aspx</comments>
      <category>Utah .NET User Group</category>
      <category>Visual Studio</category>
    <feedburner:origLink>http://blog.devstone.com/aaron/2009/02/12/UtahNETUserGroupFebruary12th2009VisualStudio2010.aspx</feedburner:origLink></item>
    <item>
      <trackback:ping>http://blog.devstone.com/aaron/Trackback.aspx?guid=7abd1c25-0d15-4f1b-94dc-ed937e64a22d</trackback:ping>
      <pingback:server>http://blog.devstone.com/aaron/pingback.aspx</pingback:server>
      <pingback:target>http://blog.devstone.com/aaron/PermaLink,guid,7abd1c25-0d15-4f1b-94dc-ed937e64a22d.aspx</pingback:target>
      <dc:creator>R. Aaron Zupancic (Administrator)</dc:creator>
      <wfw:comment>http://blog.devstone.com/aaron/CommentView,guid,7abd1c25-0d15-4f1b-94dc-ed937e64a22d.aspx</wfw:comment>
      <wfw:commentRss>http://blog.devstone.com/aaron/SyndicationService.asmx/GetEntryCommentsRss?guid=7abd1c25-0d15-4f1b-94dc-ed937e64a22d</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <font face="Tahoma">A few weeks ago I made some updates to my Regular Expression Assembly
Builder that I wrote some time back.  These updates have long been requested
by users and I finally carved out some time to get them implemented.</font>
        </p>
        <p>
          <font face="Tahoma">These are the new features in verion 2.0.0.3:</font>
        </p>
        <ul>
          <li>
            <font face="Tahoma">NEW: Added the ability to assign a description to each regular
expression.  These are stored in the RegexDescriptionAttribute class. </font>
          </li>
          <li>
            <font face="Tahoma">UPD: Rearranged the RegexEditor to accommodate the new description,
changing some labels in the process, and tab order. </font>
          </li>
          <li>
            <font face="Tahoma">UPD: Made the validation textboxes 'public' so their references
aren't be continually lost each time the editor is opened in the designer. </font>
          </li>
          <li>
            <font face="Tahoma">UPD: Updated About box link to point directly to </font>
            <a href="http://blog.devstone.com/aaron">
              <font face="Tahoma">http://blog.devstone.com/aaron</font>
            </a>
            <font face="Tahoma">. </font>
          </li>
          <li>
            <font face="Tahoma">UPD: Added the regular expression description to the regular expression
grid.</font>
          </li>
        </ul>
        <p>
          <font face="Tahoma">Though perhaps a small update, I hope the changes are found to
be useful.</font>
        </p>
        <blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
          <p>
            <em>
              <font face="Tahoma">NOTE: The File menu has two 'Save' options: <strong>Save Project</strong> and <strong>Save
Release Version</strong>.  These were added a few versions ago, but I'd like
to clarify their usage.  Save Project will save your .dll (because the application
works natively with a .dll as its project).  Save Release Version will create
a \Release directory and save your .dll there as well.  However, the Release
Version has a few things (like the regular expression descriptions) stripped out. 
It's the Release version you'll want to reference in your applications if you plan
to distribute the .dll; otherwise, you'll end up with a dependency on RegexAssemblyBuilder.exe
and you wouldn't want to distribute that :).  If you source control your .dll,
I'd recommend storing both .dll files so you have your project and your release version
on hand.</font>
            </em>
          </p>
        </blockquote>
        <p>
          <font face="Tahoma">Also, partially due to my migration to dasBlog, I've not gotten
around to updating my little downloader application.  Therefore, you can simply </font>
          <a href="http://blog.devstone.com/downloads/aaron/RegexAssemblyBuilder 2.0.0.3.zip" temp_href="http://blog.devstone.com/downloads/aaron/RegexAssemblyBuilder 2.0.0.3.zip">
            <font face="Tahoma">download
the application directly here</font>
          </a>
          <font face="Tahoma">.  Let me know if
you have any issues with it.</font>
        </p>
        <p>
          <font face="Tahoma">For a history of the application, please check out </font>
          <a href="http://blog.devstone.com/aaron/2007/12/31/NETRegularExpressionAssemblyBuilderToolV2000.aspx">
            <font face="Tahoma">this
post</font>
          </a>
          <font face="Tahoma"> and its links as well.</font>
        </p>
        <img width="0" height="0" src="http://blog.devstone.com/aaron/aggbug.ashx?id=7abd1c25-0d15-4f1b-94dc-ed937e64a22d" />
      </body>
      <title>.NET Regular Express Assembly Builder Tool (v2.0.0.3)</title>
      <guid isPermaLink="false">http://blog.devstone.com/aaron/PermaLink,guid,7abd1c25-0d15-4f1b-94dc-ed937e64a22d.aspx</guid>
      <link>http://feedproxy.google.com/~r/ZupancicPerspective/~3/Pufi8xbZIew/NETRegularExpressAssemblyBuilderToolV2003.aspx</link>
      <pubDate>Tue, 23 Dec 2008 17:21:32 GMT</pubDate>
      <description>&lt;p&gt;
&lt;font face=Tahoma&gt;A few weeks ago I made some updates to my Regular Expression Assembly
Builder that I wrote some time back.&amp;nbsp; These updates have long been requested
by users and I finally carved out some time to get them implemented.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face=Tahoma&gt;These are the new features in verion 2.0.0.3:&lt;/font&gt;
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;font face=Tahoma&gt;NEW: Added the ability to assign a description to each regular expression.&amp;nbsp;
These are stored in the RegexDescriptionAttribute class. &lt;/font&gt; 
&lt;li&gt;
&lt;font face=Tahoma&gt;UPD: Rearranged the RegexEditor to accommodate the new description,
changing some&amp;nbsp;labels in the process, and tab order. &lt;/font&gt; 
&lt;li&gt;
&lt;font face=Tahoma&gt;UPD: Made the validation textboxes 'public' so their references
aren't be continually&amp;nbsp;lost each time the editor is opened in the designer. &lt;/font&gt; 
&lt;li&gt;
&lt;font face=Tahoma&gt;UPD: Updated About box link to point directly to &lt;/font&gt;&lt;a href="http://blog.devstone.com/aaron"&gt;&lt;font face=Tahoma&gt;http://blog.devstone.com/aaron&lt;/font&gt;&lt;/a&gt;&lt;font face=Tahoma&gt;. &lt;/font&gt; 
&lt;li&gt;
&lt;font face=Tahoma&gt;UPD: Added the regular expression description to the regular expression
grid.&lt;/font&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
&lt;font face=Tahoma&gt;Though perhaps a small update, I hope the changes are found to be
useful.&lt;/font&gt;
&lt;/p&gt;
&lt;blockquote dir=ltr style="MARGIN-RIGHT: 0px"&gt; 
&lt;p&gt;
&lt;em&gt;&lt;font face=Tahoma&gt;NOTE: The File menu has two 'Save' options: &lt;strong&gt;Save Project&lt;/strong&gt; and &lt;strong&gt;Save
Release Version&lt;/strong&gt;.&amp;nbsp; These were added a few versions ago, but I'd like
to clarify their usage.&amp;nbsp; Save Project will save your .dll (because the application
works natively with a .dll as its project).&amp;nbsp; Save Release Version will create
a \Release directory and save your .dll there as well.&amp;nbsp; However, the Release
Version has a few things (like the regular expression descriptions) stripped out.&amp;nbsp;
It's the Release version you'll want to reference in your applications if you plan
to distribute the .dll; otherwise, you'll end up with a dependency on RegexAssemblyBuilder.exe
and you wouldn't want to distribute that :).&amp;nbsp; If you source control your .dll,
I'd recommend storing both .dll files so you have your project and your release version
on hand.&lt;/font&gt;&lt;/em&gt;
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
&lt;font face=Tahoma&gt;Also, partially due to my migration to dasBlog, I've not gotten
around to updating my little downloader application.&amp;nbsp; Therefore, you can simply &lt;/font&gt;&lt;a href="http://blog.devstone.com/downloads/aaron/RegexAssemblyBuilder 2.0.0.3.zip" temp_href="http://blog.devstone.com/downloads/aaron/RegexAssemblyBuilder 2.0.0.3.zip"&gt;&lt;font face=Tahoma&gt;download
the application directly here&lt;/font&gt;&lt;/a&gt;&lt;font face=Tahoma&gt;.&amp;nbsp; Let me know if you
have any issues with it.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face=Tahoma&gt;For a history of the application, please check out &lt;/font&gt;&lt;a href="http://blog.devstone.com/aaron/2007/12/31/NETRegularExpressionAssemblyBuilderToolV2000.aspx"&gt;&lt;font face=Tahoma&gt;this
post&lt;/font&gt;&lt;/a&gt;&lt;font face=Tahoma&gt; and its links as well.&lt;/font&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.devstone.com/aaron/aggbug.ashx?id=7abd1c25-0d15-4f1b-94dc-ed937e64a22d" /&gt;</description>
      <comments>http://blog.devstone.com/aaron/CommentView,guid,7abd1c25-0d15-4f1b-94dc-ed937e64a22d.aspx</comments>
      <category>C#</category>
      <category>Regular Expressions</category>
      <category>Utilities</category>
    <feedburner:origLink>http://blog.devstone.com/aaron/2008/12/23/NETRegularExpressAssemblyBuilderToolV2003.aspx</feedburner:origLink></item>
    <item>
      <trackback:ping>http://blog.devstone.com/aaron/Trackback.aspx?guid=49757941-ed25-4831-8d2f-84f13abf6822</trackback:ping>
      <pingback:server>http://blog.devstone.com/aaron/pingback.aspx</pingback:server>
      <pingback:target>http://blog.devstone.com/aaron/PermaLink,guid,49757941-ed25-4831-8d2f-84f13abf6822.aspx</pingback:target>
      <dc:creator>R. Aaron Zupancic (Administrator)</dc:creator>
      <wfw:comment>http://blog.devstone.com/aaron/CommentView,guid,49757941-ed25-4831-8d2f-84f13abf6822.aspx</wfw:comment>
      <wfw:commentRss>http://blog.devstone.com/aaron/SyndicationService.asmx/GetEntryCommentsRss?guid=49757941-ed25-4831-8d2f-84f13abf6822</wfw:commentRss>
      <slash:comments>4</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <font face="Tahoma">Suppose you have a table (tblDemo) and a view (vwDemo) over that
table that joins tblDemo to another table to retrieve their results.</font>
        </p>
        <p>
          <font face="Tahoma">The view might resemble the following:</font>
        </p>
        <blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
          <p>
            <font face="Courier New">CREATE VIEW vwDemo<br />
AS<br />
SELECT d.*, o.OtherField01, o.OtherField02<br />
FROM tblDemo d<br />
INNER JOIN tblOther o ON d.ID = o.ID</font>
          </p>
        </blockquote>
        <p>
          <font face="Tahoma">While I've never advocated selecting * from anything, it does
have its uses; but it turns out there's potentially a nasty gotcha.  Personally,
I like to err on the side of higher specificity, though that usually requires a bit
more manual tweaking as time goes on.</font>
        </p>
        <p>
          <font face="Tahoma">What happens if the schema of tblDemo changes?  Well, if
you don't update or recreate your view, you may very well get some unexpected side
effects.</font>
        </p>
        <p>
          <font face="Tahoma">For instance, if a new field were added to tblDemo (e.g., <font face="Courier New">ALTER
TABLE tblDemo ADD NewField int</font>), the view, when inspected in SQL shows the
following:</font>
        </p>
        <blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
          <p>
            <font face="Courier New">SELECT d.ID, d.Field01, d.Field02, d.Field03, d.NewField
AS OtherField01, o.OtherField01 AS OtherField02, o.OtherField02<br />
FROM tblDemo d<br />
INNER JOIN tblOther o ON d.ID = o.ID</font>
          </p>
        </blockquote>
        <p>
          <font face="Tahoma">Notice that the 'NewField' got aliased with the field name at
the new fields position! That field, in turn, received the next field's alias, and
so on. Understandably, this can have some very negative side effects in your applications.</font>
        </p>
        <p>
          <font face="Tahoma">For this reason I would strongly recommend AGAINST using SELECT
* in a view in SQL Server.  Of course, if your view does nothing but SELECT *
on a single table or the '*' is the last part of the SELECT clause (such as <font face="Courier New">SELECT
o.OtherField01, o.OtherField02, d.* FROM</font> ...) then you circumvent the
issue.  When used in conjunction with other columns, however, there are indeed
repercussions.</font>
        </p>
        <p>
          <font face="Tahoma">I don't know that this is a bug in SQL Server, though it may appear
to be at first.  I'm not a SQL Server guru (though I'm exceptionally dangerous
with it :)), but I suspect that upon building the view, SQL catalogs all of the fields
in a pseudo-table.  Changing the schema thereof, without updating the view causes
a misalignment between the new schema and the pseudo-table that was build previously.</font>
        </p>
        <p>
          <font face="Tahoma">Can anyone confirm this or elaborate on the behavior?</font>
        </p>
        <img width="0" height="0" src="http://blog.devstone.com/aaron/aggbug.ashx?id=49757941-ed25-4831-8d2f-84f13abf6822" />
      </body>
      <title>Caution: Avoid Using SELECT * in a SQL View</title>
      <guid isPermaLink="false">http://blog.devstone.com/aaron/PermaLink,guid,49757941-ed25-4831-8d2f-84f13abf6822.aspx</guid>
      <link>http://feedproxy.google.com/~r/ZupancicPerspective/~3/j4wlVy0H9GE/CautionAvoidUsingSELECTInASQLView.aspx</link>
      <pubDate>Tue, 23 Dec 2008 00:47:24 GMT</pubDate>
      <description>&lt;p&gt;
&lt;font face=Tahoma&gt;Suppose you have a table (tblDemo) and a view (vwDemo) over that
table that joins tblDemo to another table to retrieve their results.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face=Tahoma&gt;The view might resemble the following:&lt;/font&gt;
&lt;/p&gt;
&lt;blockquote dir=ltr style="MARGIN-RIGHT: 0px"&gt; 
&lt;p&gt;
&lt;font face="Courier New"&gt;CREATE VIEW vwDemo&lt;br&gt;
AS&lt;br&gt;
SELECT d.*, o.OtherField01, o.OtherField02&lt;br&gt;
FROM tblDemo d&lt;br&gt;
INNER JOIN tblOther o ON d.ID = o.ID&lt;/font&gt;
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
&lt;font face=Tahoma&gt;While I've never advocated selecting * from anything, it does have
its uses; but it turns out there's potentially a nasty gotcha.&amp;nbsp; Personally, I
like to err on the side of higher specificity, though that usually requires a bit
more manual tweaking as time goes on.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face=Tahoma&gt;What happens if the schema of tblDemo changes?&amp;nbsp; Well, if you
don't update or recreate your view, you may very well get some unexpected side effects.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face=Tahoma&gt;For instance, if a new field were added to tblDemo (e.g., &lt;font face="Courier New"&gt;ALTER
TABLE tblDemo ADD NewField int&lt;/font&gt;), the view, when inspected in SQL shows the
following:&lt;/font&gt;
&lt;/p&gt;
&lt;blockquote dir=ltr style="MARGIN-RIGHT: 0px"&gt; 
&lt;p&gt;
&lt;font face="Courier New"&gt;SELECT d.ID, d.Field01, d.Field02, d.Field03, d.NewField
AS OtherField01, o.OtherField01 AS OtherField02, o.OtherField02&lt;br&gt;
FROM tblDemo d&lt;br&gt;
INNER JOIN tblOther o ON d.ID = o.ID&lt;/font&gt;
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
&lt;font face=Tahoma&gt;Notice that the 'NewField' got aliased with the field name at the
new fields position! That field, in turn, received the next field's alias, and so
on. Understandably, this can have some very negative side effects in your applications.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face=Tahoma&gt;For this reason I would strongly recommend AGAINST using SELECT
* in a view in SQL Server.&amp;nbsp; Of course, if your view does nothing but SELECT *
on a single table or the '*' is the last part of the SELECT clause (such as &lt;font face="Courier New"&gt;SELECT
o.OtherField01, o.OtherField02, d.* FROM&lt;/font&gt;&amp;nbsp;...) then you circumvent the
issue.&amp;nbsp; When used in conjunction with other columns, however, there are indeed
repercussions.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face=Tahoma&gt;I don't know that this is a bug in SQL Server, though it may appear
to be at first.&amp;nbsp; I'm not a SQL Server guru (though I'm exceptionally dangerous
with it :)), but I suspect that upon building the view, SQL catalogs all of the fields
in a pseudo-table.&amp;nbsp; Changing the schema thereof, without updating the view causes
a misalignment between the new schema and the pseudo-table that was build previously.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face=Tahoma&gt;Can anyone confirm this or elaborate on the behavior?&lt;/font&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.devstone.com/aaron/aggbug.ashx?id=49757941-ed25-4831-8d2f-84f13abf6822" /&gt;</description>
      <comments>http://blog.devstone.com/aaron/CommentView,guid,49757941-ed25-4831-8d2f-84f13abf6822.aspx</comments>
      <category>SQL Server</category>
    <feedburner:origLink>http://blog.devstone.com/aaron/2008/12/23/CautionAvoidUsingSELECTInASQLView.aspx</feedburner:origLink></item>
    <item>
      <trackback:ping>http://blog.devstone.com/aaron/Trackback.aspx?guid=83e1ae0d-1839-4d2a-a2a0-ee86a9c9be7f</trackback:ping>
      <pingback:server>http://blog.devstone.com/aaron/pingback.aspx</pingback:server>
      <pingback:target>http://blog.devstone.com/aaron/PermaLink,guid,83e1ae0d-1839-4d2a-a2a0-ee86a9c9be7f.aspx</pingback:target>
      <dc:creator>R. Aaron Zupancic (Administrator)</dc:creator>
      <wfw:comment>http://blog.devstone.com/aaron/CommentView,guid,83e1ae0d-1839-4d2a-a2a0-ee86a9c9be7f.aspx</wfw:comment>
      <wfw:commentRss>http://blog.devstone.com/aaron/SyndicationService.asmx/GetEntryCommentsRss?guid=83e1ae0d-1839-4d2a-a2a0-ee86a9c9be7f</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <font face="Tahoma">I had a lot of fun preparing for and presenting on Silverlight
2 at the Utah .NET User Group the other night.  It was a great evening. 
Thanks to all that come out to participate and help bolster the .NET development community.
:)</font>
        </p>
        <img width="0" height="0" src="http://blog.devstone.com/aaron/aggbug.ashx?id=83e1ae0d-1839-4d2a-a2a0-ee86a9c9be7f" />
      </body>
      <title>Utah .NET User Group - Silverlight 2</title>
      <guid isPermaLink="false">http://blog.devstone.com/aaron/PermaLink,guid,83e1ae0d-1839-4d2a-a2a0-ee86a9c9be7f.aspx</guid>
      <link>http://feedproxy.google.com/~r/ZupancicPerspective/~3/FMRmArCw8OA/UtahNETUserGroupSilverlight2.aspx</link>
      <pubDate>Sun, 14 Dec 2008 06:14:44 GMT</pubDate>
      <description>&lt;p&gt;
&lt;font face=Tahoma&gt;I had a lot of fun preparing for and presenting on Silverlight 2
at the Utah .NET User Group the other night.&amp;nbsp; It was a great evening.&amp;nbsp; Thanks
to all that come out to participate and help bolster the .NET development community.
:)&lt;/font&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.devstone.com/aaron/aggbug.ashx?id=83e1ae0d-1839-4d2a-a2a0-ee86a9c9be7f" /&gt;</description>
      <comments>http://blog.devstone.com/aaron/CommentView,guid,83e1ae0d-1839-4d2a-a2a0-ee86a9c9be7f.aspx</comments>
      <category>Silverlight</category>
      <category>Utah .NET User Group</category>
    <feedburner:origLink>http://blog.devstone.com/aaron/2008/12/14/UtahNETUserGroupSilverlight2.aspx</feedburner:origLink></item>
  </channel>
</rss>
