Hi - newbie to VB - am using Textboxes to dispolay text and have the textboxes colored yellow, white and red depending upon their designation. I want to use the double-click event processing of the textboxes (using event handler) and take different actions depending upon the color of the textbox. I set the color as shown (this works OK):

TextBox1.BackColor = Color.Yellow

I attemp to test the color with the following (this does not work)

if TextBox1.BackColor = Color.Yellow then
' do something'
end if
if TextBox1.BackColor = Color.Red then
' do something else'
end if


This creates an error and does not work and I have not been able to find the way to test this and take appropriate action. Help would be appreciated in the way to test the BackColor existing and take action depending on what this color is.

Thanks and cheers

Ross