By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,417 Members | 1,192 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,417 IT Pros & Developers. It's quick & easy.

Color and brush convert

P: n/a
JR
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

ofcourse this won't work but who will help me

Jan
Nov 21 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Try

Dim myBrush as SolidBrush

myBrush = New SolidBrush(cColor)
....
myBrush.Dispose()

--

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio .NET, VB6, VB5 and VBA
You can code, design and document much faster.
Free resources for add-in developers:
http://www.mztools.com

"JR" <XX***@XX.XX> escribió en el mensaje
news:GH**********************@phobos.telenet-ops.be...
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

ofcourse this won't work but who will help me

Jan

Nov 21 '05 #2

P: n/a
JR
Works great thanks for the fast answer.

"Carlos J. Quintero [.NET MVP]" <ca*****@NOSPAMsogecable.com> schreef in
bericht news:%2***************@TK2MSFTNGP12.phx.gbl...
Try

Dim myBrush as SolidBrush

myBrush = New SolidBrush(cColor)
...
myBrush.Dispose()

--

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio .NET, VB6, VB5 and VBA
You can code, design and document much faster.
Free resources for add-in developers:
http://www.mztools.com

"JR" <XX***@XX.XX> escribió en el mensaje
news:GH**********************@phobos.telenet-ops.be...
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

ofcourse this won't work but who will help me

Jan



Nov 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.