Hi,
I'm using Visual Basic 6 and I'm trying to make a program to change the
colours of traffic lights.
I am using 3 oval shapes, for each light. I want the traffic lights to
change colour through the standard traffic light sequence by changing the
'backcolor' of each oval: Red, Red & Amber, Green, Amber, Red.
There are 2 ways I am trying to do this:
With 1 command button. Each time it is clicked it changes the backcolor
property of the circles. The problem with this, is that I don't know how to
make something change each time the command button is clicked:
e.g. Red light
CLICK
Red & Amber light
CLICK
Green Light
CLICK, etc.
I tried doing it, but it changes all the lights at once, on the first click,
and I want each light to change each time the button is clicked. I know I
could do this using a few buttons, but don't know how to do it with just 1?
The second way I am trying to do this is using a Timer Control.
The problem is, I have no idea how to do this. All my reference books tell
me how to set it up to perform the 'TIME' function. Nothing else. I want
the lights to change after each second (1000 interval) but, I don't know how
to do this.
Could anyone shed some light on the subject please? I would be very
grateful for any help anyone can give.
Thanks
Cassandra