'定义定时器
dim aTimer As New System.Timers.Timer()
Private Sub Application_Start(sender As Object, e As EventArgs)
aTimer.Elapsed += New System.Timers.ElapsedEventHandler(TimedEvent)
aTimer.Interval = 3000
'设置间隔时间
aTimer.Start()
End Sub
Private Sub TimedEvent(source As Object, e As System.Timers.ElapsedEventArgs)
msg("执行任务")
End Sub
Private Sub Application_End(sender As Object, e As EventArgs)
aTimer.Stop()
End Sub