开发者

Traffic Lights in vb.net

开发者 https://www.devze.com 2023-03-18 09:26 出处:网络
please someone help me on how to use time in vb.net.I would like to make a traffic lights program in vb.net but am not yet sure where to start besides the interface.I want the lights to c开发者_开发百

please someone help me on how to use time in vb.net.I would like to make a traffic lights program in vb.net but am not yet sure where to start besides the interface.I want the lights to c开发者_开发百科hange within a give time.I have just started learning vb.net, about 2 weeks ago.Thanks in advance.


take a look at the timer function. In short you can set it to execute code at an interveral you choose. You can also change the interval. For example when turning the light green set the interval to 60 seconds, after the 60 seconds the 'tick' event is fired, and you can process code (in the tick routine) to turn the light yellow and set the interval to 15 seconds, and so forth.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号