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

<channel>
	<title>C# 411 &#187; Graphics</title>
	<atom:link href="http://www.csharp411.com/category/graphics/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.csharp411.com</link>
	<description>C# Information, Code, Tips and News</description>
	<lastBuildDate>Mon, 19 Jul 2010 14:56:35 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Graphics.MeasureString Exception: Parameter is Invalid</title>
		<link>http://www.csharp411.com/graphics-measurestring-exception-parameter-is-invalid/</link>
		<comments>http://www.csharp411.com/graphics-measurestring-exception-parameter-is-invalid/#comments</comments>
		<pubDate>Wed, 10 Mar 2010 21:34:11 +0000</pubDate>
		<dc:creator>timm</dc:creator>
				<category><![CDATA[Graphics]]></category>

		<guid isPermaLink="false">http://www.csharp411.com/graphics-measurestring-exception-parameter-is-invalid/</guid>
		<description><![CDATA[My C# program threw an exception from the following method:
SizeF size = Graphics.MeasureString( text, font );
  
Unfortunately, the exception’s message was rather obscure: “Parameter is invalid.”&#160; 
After an investigation, I discovered the error occurred because the font had been previously disposed.&#160; 
Unfortunately, the Font class does not have the typical IsDisposed property, so there [...]


Related posts:<ol><li><a href='http://www.csharp411.com/change-font-size/' rel='bookmark' title='Permanent Link: Change Font Size'>Change Font Size</a></li><li><a href='http://www.csharp411.com/change-font-style/' rel='bookmark' title='Permanent Link: Change Font Style'>Change Font Style</a></li><li><a href='http://www.csharp411.com/convert-between-synchronous-and-asynchronous/' rel='bookmark' title='Permanent Link: Convert Between Synchronous and Asynchronous'>Convert Between Synchronous and Asynchronous</a></li></ol>]]></description>
		<wfw:commentRss>http://www.csharp411.com/graphics-measurestring-exception-parameter-is-invalid/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Extract Application&#039;s Own Icon in C#</title>
		<link>http://www.csharp411.com/extract-applications-own-icon-in-c/</link>
		<comments>http://www.csharp411.com/extract-applications-own-icon-in-c/#comments</comments>
		<pubDate>Thu, 10 Jul 2008 12:43:51 +0000</pubDate>
		<dc:creator>timm</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Graphics]]></category>
		<category><![CDATA[icon]]></category>

		<guid isPermaLink="false">http://www.csharp411.com/extract-applications-own-icon-in-c/</guid>
		<description><![CDATA[It's easy to extract an application's own icon in C#:

form.Icon = Icon.ExtractAssociatedIcon( Application.ExecutablePath );

The ExtractAssociatedIcon static method on the Icon class (in System.Drawing) extracts the associated icon from any file.  By supplying the Application.ExecutablePath (in System.Windows.Forms), you extract the application's own icon.


Related posts:NotifyIcon.ShowBalloonTip IssuesDetermine if Your C# Application is 64-bitClose All Forms in an Application [...]


Related posts:<ol><li><a href='http://www.csharp411.com/notifyiconshowballoontip-issues/' rel='bookmark' title='Permanent Link: NotifyIcon.ShowBalloonTip Issues'>NotifyIcon.ShowBalloonTip Issues</a></li><li><a href='http://www.csharp411.com/determine-if-your-c-application-is-64-bit/' rel='bookmark' title='Permanent Link: Determine if Your C# Application is 64-bit'>Determine if Your C# Application is 64-bit</a></li><li><a href='http://www.csharp411.com/close-all-forms-in-a-thread-safe-manner/' rel='bookmark' title='Permanent Link: Close All Forms in an Application in a Thread-Safe Manner'>Close All Forms in an Application in a Thread-Safe Manner</a></li></ol>]]></description>
		<wfw:commentRss>http://www.csharp411.com/extract-applications-own-icon-in-c/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Padding: Like a Rectangle, but Not</title>
		<link>http://www.csharp411.com/padding-like-a-rectangle-but-not/</link>
		<comments>http://www.csharp411.com/padding-like-a-rectangle-but-not/#comments</comments>
		<pubDate>Thu, 26 Jul 2007 22:20:13 +0000</pubDate>
		<dc:creator>timm</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Graphics]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Padding]]></category>
		<category><![CDATA[Rectangle]]></category>

		<guid isPermaLink="false">http://www.mini-tools.com/at2/csharp/wordpress/padding-like-a-rectangle-but-not/</guid>
		<description><![CDATA[The .NET 2.0 upgrade included many minor improvements that are easily overlooked.  One such improvement is Padding, a handy structure in the System.Windows.Forms namespace that you may find useful for representing offsets, margins or padding in the user interface.

Whereas the Rectangle structure has Left/Top/Width/Height as its primary properties, the Padding structure has Left/Top/Right/Bottom.  [...]


Related posts:<ol><li><a href='http://www.csharp411.com/embedded-image-resources/' rel='bookmark' title='Permanent Link: Embedded Image Resources'>Embedded Image Resources</a></li><li><a href='http://www.csharp411.com/lighten-and-darken-colors-in-net/' rel='bookmark' title='Permanent Link: Lighten and Darken Colors in .NET'>Lighten and Darken Colors in .NET</a></li><li><a href='http://www.csharp411.com/change-font-size/' rel='bookmark' title='Permanent Link: Change Font Size'>Change Font Size</a></li></ol>]]></description>
		<wfw:commentRss>http://www.csharp411.com/padding-like-a-rectangle-but-not/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Change Font Style</title>
		<link>http://www.csharp411.com/change-font-style/</link>
		<comments>http://www.csharp411.com/change-font-style/#comments</comments>
		<pubDate>Thu, 05 Jul 2007 13:02:53 +0000</pubDate>
		<dc:creator>timm</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Graphics]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[Font]]></category>
		<category><![CDATA[FontStyle]]></category>

		<guid isPermaLink="false">http://www.mini-tools.com/at2/csharp/wordpress/change-font-style/</guid>
		<description><![CDATA[Changing a font style is a bit easier than changing its size, as there is a Font constructor that accepts a font and style as arguments.  For example, to bold a label's font:


Label label = new Label();
. . .
label.Font = new Font( label.Font, FontStyle.Bold );


If you want to keep the original style but also [...]


Related posts:<ol><li><a href='http://www.csharp411.com/change-font-size/' rel='bookmark' title='Permanent Link: Change Font Size'>Change Font Size</a></li><li><a href='http://www.csharp411.com/embedded-image-resources/' rel='bookmark' title='Permanent Link: Embedded Image Resources'>Embedded Image Resources</a></li><li><a href='http://www.csharp411.com/c-getpixel-and-setpixel/' rel='bookmark' title='Permanent Link: C# GetPixel and SetPixel'>C# GetPixel and SetPixel</a></li></ol>]]></description>
		<wfw:commentRss>http://www.csharp411.com/change-font-style/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Change Font Size</title>
		<link>http://www.csharp411.com/change-font-size/</link>
		<comments>http://www.csharp411.com/change-font-size/#comments</comments>
		<pubDate>Thu, 05 Jul 2007 12:58:39 +0000</pubDate>
		<dc:creator>timm</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Graphics]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[Font]]></category>

		<guid isPermaLink="false">http://www.mini-tools.com/at2/csharp/wordpress/change-font-size/</guid>
		<description><![CDATA[An inspection of the Font class will reveal that every public property is read-only.  This means to change a font's size, you need to create a new Font object with all the same properties of your current font but with the new size.  Here is a handy method to do just that:


static public [...]


Related posts:<ol><li><a href='http://www.csharp411.com/change-font-style/' rel='bookmark' title='Permanent Link: Change Font Style'>Change Font Style</a></li><li><a href='http://www.csharp411.com/lighten-and-darken-colors-in-net/' rel='bookmark' title='Permanent Link: Lighten and Darken Colors in .NET'>Lighten and Darken Colors in .NET</a></li><li><a href='http://www.csharp411.com/c-getpixel-and-setpixel/' rel='bookmark' title='Permanent Link: C# GetPixel and SetPixel'>C# GetPixel and SetPixel</a></li></ol>]]></description>
		<wfw:commentRss>http://www.csharp411.com/change-font-size/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Lighten and Darken Colors in .NET</title>
		<link>http://www.csharp411.com/lighten-and-darken-colors-in-net/</link>
		<comments>http://www.csharp411.com/lighten-and-darken-colors-in-net/#comments</comments>
		<pubDate>Fri, 22 Jun 2007 16:50:27 +0000</pubDate>
		<dc:creator>timm</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Graphics]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[Color]]></category>
		<category><![CDATA[SystemColors]]></category>

		<guid isPermaLink="false">http://www.mini-tools.com/at2/csharp/wordpress/lighten-and-darken-colors-in-net/</guid>
		<description><![CDATA[There is a very handy .NET class called ControlPaint in the System.Windows.Forms namespace that enables you to draw your own controls and control elements using the standard Windows style and theme.  Buried in this rich class are four methods that enable you to lighten and darken colors:


Dark &#8211; Creates a darker color from the [...]


Related posts:<ol><li><a href='http://www.csharp411.com/change-font-size/' rel='bookmark' title='Permanent Link: Change Font Size'>Change Font Size</a></li><li><a href='http://www.csharp411.com/c-getpixel-and-setpixel/' rel='bookmark' title='Permanent Link: C# GetPixel and SetPixel'>C# GetPixel and SetPixel</a></li><li><a href='http://www.csharp411.com/change-font-style/' rel='bookmark' title='Permanent Link: Change Font Style'>Change Font Style</a></li></ol>]]></description>
		<wfw:commentRss>http://www.csharp411.com/lighten-and-darken-colors-in-net/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>C# GetPixel and SetPixel</title>
		<link>http://www.csharp411.com/c-getpixel-and-setpixel/</link>
		<comments>http://www.csharp411.com/c-getpixel-and-setpixel/#comments</comments>
		<pubDate>Wed, 20 Jun 2007 17:32:49 +0000</pubDate>
		<dc:creator>timm</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Graphics]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[GetPixel]]></category>
		<category><![CDATA[SetPixel]]></category>

		<guid isPermaLink="false">http://www.mini-tools.com/at2/csharp/wordpress/c-getpixel-and-setpixel/</guid>
		<description><![CDATA[It's hard to believe the comprehensive .NET framework would omit such obvious functions as GetPixel and SetPixel from its Drawing library.  Fortunately, we can access the GDI functions using Interop, as shown below.  Notice the conversion required between the COLORREF integer used by the GDI methods and the Color structure used by our [...]


Related posts:<ol><li><a href='http://www.csharp411.com/convert-handle-to-form-and-vice-versa/' rel='bookmark' title='Permanent Link: Convert Handle to Form, and Vice Versa'>Convert Handle to Form, and Vice Versa</a></li><li><a href='http://www.csharp411.com/truncate-file-path-with-ellipsis/' rel='bookmark' title='Permanent Link: Truncate File Path with Ellipsis'>Truncate File Path with Ellipsis</a></li><li><a href='http://www.csharp411.com/change-font-size/' rel='bookmark' title='Permanent Link: Change Font Size'>Change Font Size</a></li></ol>]]></description>
		<wfw:commentRss>http://www.csharp411.com/c-getpixel-and-setpixel/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Embedded Image Resources</title>
		<link>http://www.csharp411.com/embedded-image-resources/</link>
		<comments>http://www.csharp411.com/embedded-image-resources/#comments</comments>
		<pubDate>Tue, 08 May 2007 19:16:45 +0000</pubDate>
		<dc:creator>timm</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Graphics]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[Windows Forms]]></category>
		<category><![CDATA[Embedded-Resources]]></category>
		<category><![CDATA[Image-Resources]]></category>
		<category><![CDATA[Resources]]></category>

		<guid isPermaLink="false">http://www.mini-tools.com/at2/csharp/wordpress/embedded-image-resources/</guid>
		<description><![CDATA[If you use images in a .NET application, chances are you will find it more convenient to embed those images as resources in your project, rather than leaving them as separate files and trying to locate and load the images from disk when the application runs.

Add Image Resource
To add an image to your project as [...]


Related posts:<ol><li><a href='http://www.csharp411.com/display-an-rtf-file-thats-a-c-embedded-resource/' rel='bookmark' title='Permanent Link: Display an RTF File that's a C# Embedded Resource'>Display an RTF File that's a C# Embedded Resource</a></li><li><a href='http://www.csharp411.com/adding-assemblies-to-the-visual-studio-add-reference-dialog/' rel='bookmark' title='Permanent Link: Adding Assemblies to the Visual Studio &#34;Add Reference&#34; Dialog'>Adding Assemblies to the Visual Studio &#34;Add Reference&#34; Dialog</a></li><li><a href='http://www.csharp411.com/net-assembly-faq-part-1/' rel='bookmark' title='Permanent Link: .NET Assembly FAQ &#8211; Part 1'>.NET Assembly FAQ &#8211; Part 1</a></li></ol>]]></description>
		<wfw:commentRss>http://www.csharp411.com/embedded-image-resources/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>
