Click to See Complete Forum and Search --> : comparing background colours


Jym
December 7th, 2002, 12:08 PM
is there a way to compare the background of 2 labels ?

if label1.background = label2.background then

doesn't work and I can't find a way to get the colour name into a string variable i.e.

dim colour as string

colour = label1.background

I'm sure there's a way, I am just drawing a complete blank

Thanks

Jym

Athley
December 8th, 2002, 08:58 AM
If Label1.BackColor.ToString = Label2.BackColor.ToString Then
MsgBox("Same")
Else
MsgBox("Not same")
End If

/Leyan

Jym
December 8th, 2002, 09:14 AM
well doesn't that make all the sense in the world :-)

Thank you