網路城邦
上一篇 回創作列表 下一篇   字體:
模擬交通號誌
2010/05/04 10:33:02瀏覽1058|回應22|推薦0

利用三個TextBox的BackColor(背景顏色)來模擬交通號誌( Red,Yellow,Green) !

動作方式先比較簡單一點吧! First -> Green Light ON last for 5seconds and then Yellow Light ON and last for one second and then RedLight ON and last for 5seconds !

How to do it? timer控制項是不可缺的! 因有三個燈號,所以要使用到三個Timer !

So!要先知道Timer控制項吧! setting上有 "Enable"參數-> True or Flase 再來還有計時時間(Timer的計時單位是 1mS [1毫秒],所以在 Interval參數中填入要計時的次數,例如填入1000 , 則 1mS*1000=1Second!則一秒鐘動作!

想一下吧 ! how to change the light color : Red, Yellow , Green !

Have fun with this homework!

( 知識學習其他 )
回應 推薦文章 列印 加入我的文摘
上一篇 回創作列表 下一篇

引用
引用網址:https://classic-blog.udn.com/article/trackback.jsp?uid=yangfu&aid=4001626

 回應文章 頁/共 3 頁  回應文章第一頁 回應文章上一頁 回應文章下一頁 回應文章最後一頁

810154
homework
2010/06/29 22:24

高一四

21號

高麗雲

http://wwws.sysh.tc.edu.tw/~h810154/


810164
810164
2010/06/29 20:50

810164

40431

陳珮婕

http://wwws.sysh.tc.edu.tw/~h810164


810166
810166
2010/06/29 12:18
404
33
陳燕琳
810166
http://wwws.sysh.tc.edu.tw/~h810166

810165
810165
2010/06/29 12:16

810165

40432

陳鈺洵

http://wwws.sysh.tc.edu.tw/~h810165


810146
404 13 林育旻
2010/06/22 11:40
http://wwws.sysh.tc.edu.tw/~h810146/

810100
810100
2010/06/22 10:33

40311

抱歉補交~~

http://wwws.sysh.tc.edu.tw/~h810100/


810105
vb
2010/06/15 10:39

403

16

老師上一個回應是我的

http://wwws.sysh.tc.edu.tw/~h810105/


810105
vb
2010/06/15 10:33

403

16

810105

老師我的  車票1 車票2、交通號誌

功課都放在資料夾裡面,謝謝


810114
810114
2010/06/02 22:03

403

20號

陳雅筑

http://wwws.sysh.tc.edu.tw/~h810114


810109
810109
2010/06/02 21:53

403

20

莊詠婷

http://wwws.sysh.tc.edu.tw/~h810109

(第一個檔案 0603.exe)

頁/共 3 頁  回應文第一頁 回應文章上一頁 回應文章下一頁 回應文章最後一頁