--------------------
閱讀本主題的最佳解答--------------------
各位先進們好,請問如何讓按鈕自己每隔一分鐘按一次呢?謝謝。
我是做了一個將twguest內的資料夾名稱顯示到ListBox中,我希
能每隔一分鐘它自己會按下開始偵測鈕,或是每隔一分鐘他會自己
顯示到ListBox裡也可以。
下圖參考:
http://farm3.static.flickr.com/2498/...e41104.jpg?v=0
程式碼參考:
Dim StartDate
Dim StartSecond As Long
Private Sub Form_Load()
StartDate = Date
StartSecond = Timer
Timer1.Enabled = True
End Sub
Private Sub Timer_Timer
Dim NowSecond As Long
NowSecond = (Date - StartDate) * 86400 + Timer
If NowSecond - StartSecond >= 10800 Then
MsgBox "三小時到"
StartDate = Date
StartSecond = Timer
End If
End Sub