473,407 Members | 2,598 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

Distinguishment between T(red) and T(black)

cindy2
35
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:

Expand|Select|Wrap|Line Numbers
  1. For i = 0 To k
  2.         If Array1(i) = Color.Red And Array2(i) = "T" Then
  3.                 Form2.Label15.Text = Array3(i)
  4.         End If
  5. Next i
  6.  
Now the strange thing that happens is, is that Form2.Label15.Text 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
Sep 21 '07 #1
1 901
Killer42
8,435 Expert 8TB
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.
Sep 21 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: VER | last post by:
Hi. Can anyone recommend an good tested Java open source implementation of a red-black tree that I can download? I know the standard java.util.TreeMap implements it but I need one without the...
3
by: moondaddy | last post by:
I have some text in a page that when a certain even happens, I need to make it glow from black to red (through a spand of 1 second) pause for a few seconds, and then slowly change from red to black...
9
by: martin1 | last post by:
Hi, All, how to flash button with 2 color( eg. red and white)? then when user click button, the button stop flash and stay red color? Thanks
12
by: ranjitneo | last post by:
hi all.... there is a bmp file which has a black background and has a red blot(dot) in the middle(i cant exactly say).....how can i find the coordinates of the red dot.... any code ll be...
5
by: Just Another Victim of the Ambient Morality | last post by:
I need a red-black tree in Python and I was wondering if there was one built in or if there's a good implementation out there. Something that, lets face it, does whatever the C++ std::map<allows...
0
by: raylopez99 | last post by:
Is there a multiple node collection in VC++/CLI standard library? With one node having many branches? I could construct one using for example the generic KeyedCollection <K,V>, where the "V"...
2
by: parasuram | last post by:
Hi friends ............. this is a question regarding the data structures trees Pleas post it if possible with in 2 days I will thankful if some body could help doing this. Operating...
4
by: mosesdinakaran | last post by:
Can any one explain how the rule is applied for the following Regular expression $Str = 'the red king'; $Pattern = '/((red|white) (king|queen))/'; preg_match($Pattern,$Str,$Val); Result:
1
by: nongnaeja | last post by:
I don't know ,why it's error This my code from PIL import Image def ch_red(tmp): R = tmp G = tmp B = tmp
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.