|
-
May 27th, 2008, 05:58 PM
#1
Thread Starter
Member
[2005] String to Brush???
Hey I'm making a very basic paint program and I wanted to make it so you could put in any color into a combobox and set the color to a brush, but what I have is:
vb Code:
myBrush = "Brushes." + ComboBox2.Text
DrawBrush = myBrush
Although, obviously it dosn't work, can anyone help???
Languages:
C - Journyman
VB - Ameture

-
May 27th, 2008, 06:04 PM
#2
Re: [2005] String to Brush???
Try this;
VB.NET Code:
Dim myBrush As SolidBrush
myBrush = New SolidBrush(Color.FromName(ComboBox2.Text))
-
May 27th, 2008, 06:08 PM
#3
Thread Starter
Member
Re: [2005] String to Brush???
Thank You. That worked perfectaly
Languages:
C - Journyman
VB - Ameture

Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|