473,387 Members | 1,641 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

color to brush

having a moment,

cant you just
Brush br = new Brush(Color.Black);??? saying you cant cos it's an abstract
class

need to get to a brush from a color

tia
sam martin
Nov 15 '05 #1
2 43435
Hi,

Use SolidBrush instead.

--
Miha Markic - RightHand .NET consulting & software development
miha at rthand com

"boxim" <sa*********@yahoo.co.uk> wrote in message
news:un**************@tk2msftngp13.phx.gbl...
having a moment,

cant you just
Brush br = new Brush(Color.Black);??? saying you cant cos it's an abstract
class

need to get to a brush from a color

tia
sam martin

Nov 15 '05 #2
n!
> cant you just
Brush br = new Brush(Color.Black);??? saying you cant cos it's an abstract
class

need to get to a brush from a color


You need to use SolidBrush for a solid color. You can also gain access to a
colored brush with:

Brush br = Brushes.Black;

(which exists in the System.Drawing namespace).

n!
Nov 15 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: JJ | last post by:
Hi all, I am using the color dialog box to select a colour to print with. However, the e.Graphics.DrawString method uses Brushes.Black, not Color.Black. How do I convert from Brushes to...
3
by: Mad Scientist Jr | last post by:
Can someone post a clear example of how to change the background color of an individual datagrid cell for a Windows desktop app? (preferably in vb.net) I found some code on how to do this when...
2
by: JR | last post by:
Hi, I need a color to Brush convert function. something like this Function GetColorBrush(cColor as color) as brush dim sColor as string = cColor.name return brushes(sColor) End function ...
1
by: =?Utf-8?B?UEtsZW1t?= | last post by:
how to serialize a brush object with the XmlSerializer without knowing the brush type?
2
by: DNB | last post by:
I would like to add this color #E7EBF7 to my WPF data grid I know that I can add light blue color using following: Grid b = new Grid(); b.Background =...
3
by: CSharper | last post by:
Is it possible to selectivly change the color of an item in text. I saw ForeColor option, but it changes the color of all the items. If it is not possible, is there any other control list listbox...
5
by: moondaddy | last post by:
I have a custom control where users can set the backcolor of one of it's UI elements via a DP I created. One of the colors they can pick is a brush called CustomGradient where I would set the DP...
0
by: steve | last post by:
When drawing with a hatch brush with a statement such as myGraphics.FillPolygon(hatchBrush, polygon.vertices); the hatch brush is always oriented in the same direction. Is there a way of...
31
by: Tom P. | last post by:
I am doing quite a bit of custom painting and it means I have to create a lot of brushes (think one for every file system object in a directory) per paint. How expensive is this? Should I find a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.