[VB6 ] 需要各位的幫忙

看板Visual_Basic作者 (綠茶)時間19年前 (2006/04/16 15:30), 編輯推噓4(401)
留言5則, 3人參與, 最新討論串1/1
老師出了個作業 是有關紅綠燈的變換 綠燈亮25秒後 換成黃燈4秒 紅燈11秒 要有 Label1.Caption顯示其倒數(只需要倒數綠燈部分) 做了很久 綠燈倒數完之後 反而就不會動了@@ 而且做好的圖示一直是在左上角 不知道要怎麼擺到我想要的地方 才剛開始學沒多久.... 麻煩各位幫我解決 m(_ _)m (下面是我目前寫的程式 不知道到底哪裡出錯了> <) Dim index As Integer, i, a, b As Integer Private Sub Command1_Click() Set Form1.Picture = Image1(index).Picture index = index + 1 If index > 2 Then index = 0 End Sub Private Sub Timer1_Timer() i = i + 1 Label1.Caption = 25 - i If Label1.Caption = 0 Then Timer1.Enabled = False Timer2.Enabled = True End If Set Form1.Picture = Image1(0).Picture index = index + 1 If index > 2 Then index = 0 End Sub Private Sub Timer2_Timer() a = a + 1 Label1.Caption = 4 - a If Label1.Caption = 0 Then Timer2.Enabled = False Timer3.Enabled = True End If Set Form1.Picture = Image1(1).Picture End Sub -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 218.172.23.144

04/16 20:46, , 1F
你有記得設定Timer2的Interval屬性嗎?
04/16 20:46, 1F

04/16 20:47, , 2F
因為我剛剛在測試的時候,也是忘記設定,就跑不動 ^^"
04/16 20:47, 2F

04/16 20:56, , 3F
好奇怪,我開他的檔案,沒有表單
04/16 20:56, 3F

04/16 22:44, , 4F
幫他放檔案 http://0rz.net/4e1fQ
04/16 22:44, 4F

04/20 23:22, , 5F
他的不會是VB5.0吧?
04/20 23:22, 5F
文章代碼(AID): #14GV9ylu (Visual_Basic)
文章代碼(AID): #14GV9ylu (Visual_Basic)