How to convert this.BackColor to System.Drawing. Brush
Convert
Collapse
This topic is closed.
X
X
-
[Gho]Tags: None -
Nicholas Paldino [.NET/C# MVP]
Re: Convert
Gho,
You can not, because they are two different things. The BackColor is a
color which a brush uses to paint a texture or pattern. You can create a
brush which is just a solid line, if you wish by using the SolidBrush class
in the System.Drawing namespace. You can then set the Color property on
that brush to the color you want.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mvp@spam.guard. caspershouse.co m
"[Gho]" <yousefk@taux01 .nsc.com> wrote in message
news:0ae001c393 2f$7a462830$a00 1280a@phx.gbl.. .[color=blue]
> How to convert this.BackColor to System.Drawing. Brush[/color]
-
Allen Anderson
Re: Convert
Brush mybrush = new SolidBrush( this.BackColor );
make sure you mybrush.Dispose (); after you are done with it or you
will leak GDI resources.
Allen Anderson
mailto: allen@put my website url here.com
On Wed, 15 Oct 2003 08:17:42 -0700, "[Gho]" <yousefk@taux01 .nsc.com>
wrote:
[color=blue]
>How to convert this.BackColor to System.Drawing. Brush[/color]
Comment
Comment