compare colors

  • Thread starter Thread starter Lore Leunoeg
  • Start date Start date
L

Lore Leunoeg

How can I test if a form has a specific color?

'This doesn't work
If (Me.BackColor = System.Drawing.SystemColors.Control) Then
Me.BackColor = Color.Tomato
End f

I tried some conversions which didn't work eather.

Thank you
Sincerely
Lore
 
Hi,

Try something like this.

If Me.BackColor.Equals(System.Drawing.SystemColors.Control) Then
Me.BackColor = Color.Tomato
End If


Ken
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top