Color and brush convert

  • Thread starter Thread starter JR
  • Start date Start date
J

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
 
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
 
Works great thanks for the fast answer.



Carlos J. Quintero said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top