<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Getting System Colors In C#</title>
	<atom:link href="http://www.masonmc.com/2008/getting-system-colors-in-c/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.masonmc.com/2008/getting-system-colors-in-c/</link>
	<description>Mason's  blog</description>
	<lastBuildDate>Fri, 05 Sep 2008 02:12:29 -0500</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: mason</title>
		<link>http://www.masonmc.com/2008/getting-system-colors-in-c/comment-page-1/#comment-20</link>
		<dc:creator>mason</dc:creator>
		<pubDate>Tue, 01 Jul 2008 23:28:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.masonmc.com/2008/getting-system-colors-in-c/#comment-20</guid>
		<description>You&#039;re absolutely right.

After a bit of puzzlement over how I could have missed it, I realized what was going on - I recently uninstalled Visual Assist and moved onto a demo of ReSharper, and when it comes to Intellisense, and specifically the little drop-down list that appears after you type the last . on System.Drawing., ReSharper behaves differently than Visual Assist X.  

Using Visual Assist, if you type &quot;Color,&quot; it shows you everything containing &quot;Color.&quot;  ReSharper shows you only things that start with &quot;Color&quot;.  So it showed only Color, ColorConverter, and ColorTranslator.

I take back the comments about C# not calling them system colors, with apologies to C# for not giving it the benefit of the doubt - System.Drawing.SystemColors is logical and well organized.  I&#039;m still not completely comfortable with both being routed into KnownColor, though - seems like SystemColors should call into SystemInformation - but whatever, now I&#039;m splitting hairs.

Thanks for the comment - the lesson here is &quot;don&#039;t trust your IDE (addons) exclusively, read the docs!&quot;</description>
		<content:encoded><![CDATA[<p>You&#8217;re absolutely right.</p>
<p>After a bit of puzzlement over how I could have missed it, I realized what was going on &#8211; I recently uninstalled Visual Assist and moved onto a demo of ReSharper, and when it comes to Intellisense, and specifically the little drop-down list that appears after you type the last . on System.Drawing., ReSharper behaves differently than Visual Assist X.  </p>
<p>Using Visual Assist, if you type &#8220;Color,&#8221; it shows you everything containing &#8220;Color.&#8221;  ReSharper shows you only things that start with &#8220;Color&#8221;.  So it showed only Color, ColorConverter, and ColorTranslator.</p>
<p>I take back the comments about C# not calling them system colors, with apologies to C# for not giving it the benefit of the doubt &#8211; System.Drawing.SystemColors is logical and well organized.  I&#8217;m still not completely comfortable with both being routed into KnownColor, though &#8211; seems like SystemColors should call into SystemInformation &#8211; but whatever, now I&#8217;m splitting hairs.</p>
<p>Thanks for the comment &#8211; the lesson here is &#8220;don&#8217;t trust your IDE (addons) exclusively, read the docs!&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve</title>
		<link>http://www.masonmc.com/2008/getting-system-colors-in-c/comment-page-1/#comment-19</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Tue, 01 Jul 2008 10:46:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.masonmc.com/2008/getting-system-colors-in-c/#comment-19</guid>
		<description>I think you are not correct.  The class System.Drawing.SystemColors is the class you&#039;re looking for.   It&#039;s been part of the BCL since version 1.0 of the .NET Framework.  No need to pinvoke GetSysColor anymore.

Every color in System.Drawing.Color is implemented as a static Property which works as a simple wrapper to System.Drawing.KnownColor  to simplify access to colors most frequently used.  Instead of &quot;Color.LemonChiffon&quot; you can invoke &quot;new Color(KnownColor.LemonChiffon)&quot; with the former being far more practical.  KnownColor is an enumeration (specifying LemonChiffon to return a value of 90) which makes it easier to interact with the Win32 subsystem.  But you cannot access system colors with this structure which are hidden in the KnownColor enumeration for the reason just stated.  The sealed SystemColor class makes use of KnownColor as well.  For instance, you can call &quot;SystemColor.ActiveBorder&quot; to get the ActiveBorder system color or invoke &quot;new Color(KnownColor.ActiveBorder)&quot;.

I think the BCL is perfectly structured strictly following the fundamentals of encapsulation by isolating system colors and &quot;normal colors&quot; in two different data types which internally refer to KnownColor.

Hope that cleared things up for you.  Regards.

Steve</description>
		<content:encoded><![CDATA[<p>I think you are not correct.  The class System.Drawing.SystemColors is the class you&#8217;re looking for.   It&#8217;s been part of the BCL since version 1.0 of the .NET Framework.  No need to pinvoke GetSysColor anymore.</p>
<p>Every color in System.Drawing.Color is implemented as a static Property which works as a simple wrapper to System.Drawing.KnownColor  to simplify access to colors most frequently used.  Instead of &#8220;Color.LemonChiffon&#8221; you can invoke &#8220;new Color(KnownColor.LemonChiffon)&#8221; with the former being far more practical.  KnownColor is an enumeration (specifying LemonChiffon to return a value of 90) which makes it easier to interact with the Win32 subsystem.  But you cannot access system colors with this structure which are hidden in the KnownColor enumeration for the reason just stated.  The sealed SystemColor class makes use of KnownColor as well.  For instance, you can call &#8220;SystemColor.ActiveBorder&#8221; to get the ActiveBorder system color or invoke &#8220;new Color(KnownColor.ActiveBorder)&#8221;.</p>
<p>I think the BCL is perfectly structured strictly following the fundamentals of encapsulation by isolating system colors and &#8220;normal colors&#8221; in two different data types which internally refer to KnownColor.</p>
<p>Hope that cleared things up for you.  Regards.</p>
<p>Steve</p>
]]></content:encoded>
	</item>
</channel>
</rss>
