Results 1 to 3 of 3

Thread: Color Comparison

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Mar 2001
    Location
    Devon, UK
    Posts
    181

    Color Comparison

    Does any one know how to compare colors???
    The following does NOT work.

    If txtSerMgrTel.ForeColor = Color.Red Then

    Converting them to int32

    Dim currentcolor As Color = txtSerMgrTel.ForeColor
    If currentcolor = Color.Red Then

    Error is
    Operator '=' is not defined for types 'System.Drawing.Color' and 'System.Drawing.Color'.

    Any ideas?
    Wind and waves resolves all problems.

  2. #2
    Hyperactive Member Bananafish's Avatar
    Join Date
    Jan 2001
    Posts
    394
    VB Code:
    1. Dim x As Color = System.Drawing.Color.AliceBlue
    2.      Dim y As Color = System.Drawing.Color.AliceBlue
    3.      If y.Equals(x) Then
    4.      End If

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Mar 2001
    Location
    Devon, UK
    Posts
    181

    Thumbs up SORTED - Color Comparison

    Cheers just what i needed
    Wind and waves resolves all problems.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width