[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???
Re: [2005] String to Brush???
Try this;
VB.NET Code:
Dim myBrush As SolidBrush
myBrush = New SolidBrush(Color.FromName(ComboBox2.Text))
Re: [2005] String to Brush???
Thank You. That worked perfectaly