T
tshad
I have a Windows form where I am trying to set the BackColor of a control
and check the color before I do it:
If control.BackColor = System.Drawing.Color.Blue Then
ChangeColor(control, Color.Red)
Else
ChangeColor(control, Color.Blue)
End If
But I get an error:
Operator '=' is not defined for types 'System.Drawing.Color' and
'System.Drawing.Color'.
I can apparently do:
control.BackColor = System.Drawing.Color.Blue
Why can't I test the color?
Thanks,
Tom
and check the color before I do it:
If control.BackColor = System.Drawing.Color.Blue Then
ChangeColor(control, Color.Red)
Else
ChangeColor(control, Color.Blue)
End If
But I get an error:
Operator '=' is not defined for types 'System.Drawing.Color' and
'System.Drawing.Color'.
I can apparently do:
control.BackColor = System.Drawing.Color.Blue
Why can't I test the color?
Thanks,
Tom