This is a Visual Basic program that works like the actual traffic light.In this program, you have to insert one timer and set its interval to any figure. Here we set it to 3000, which is equivalent to 3 seconds. Next you insert three shapes and set their shape properties to circle and fill them with three colors, green, amber (or yellow) and red. Use the following code to set one color on and the other two colors off:
Shape2.Visible = True
Shape1.Visible = False
Shape3.Visible = False
The Interface ![]() |
|
|
|
Copyright ® 2008 Dr.Liew Voon Kiong . All rights reserved |Contact: admin@vbtutor.net