Distinguishment between T(red) and T(black)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cindy2
    New Member
    • Sep 2007
    • 35

    Distinguishment between T(red) and T(black)

    Hi there,

    In my VB project, I want to distinguish the character T from other characters. I also want to distinguish the character T (red) from T (black).

    My code looks like this:

    [CODE=vbnet]
    For i = 0 To k
    If Array1(i) = Color.Red And Array2(i) = "T" Then
    Form2.Label15.T ext = Array3(i)
    End If
    Next i
    [/CODE]

    Now the strange thing that happens is, is that Form2.Label15.T ext is always filled when T is present, nomatter what color T is.

    What's going on here? It seems like the ''And''-statement isn''t working!?

    Cindy
  • Killer42
    Recognized Expert Expert
    • Oct 2006
    • 8429

    #2
    This is where the debugging facilities built into VB will help you. Interrupt execution at that point, and examine the following values...
    • array1(i)
    • Color.Red
    • array1(i) = Color.Red
    Additionally, try running with line 3 commented out, just to ensure you aren't looking for an effect that was actually caused somewhere else.

    Comment

    Working...