Imports System.Timers
' 宣告
Dim DA_Timer As New System.Timers.Timer
' 設定Timer參數
DA_Timer.Interval = 1000
DA_Timer.SynchronizingObject = Me
DA_Timer.Start()
' 註冊DA_Timer 每次到時的事件
AddHandler DA_Timer.Elapsed, AddressOf DA_Timer_OnTimedEvent
Private Sub DA_Timer_OnTimedEvent(ByVal source As Object, ByVal e As ElapsedEventArgs)
' 執行事件
End Sub
全站熱搜
留言列表