代码如下:
Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
' 应用程序启动时激发
Dim myTimer As System.Timers.Timer = New System.Timers.Timer(60000)
AddHandler myTimer.Elapsed, AddressOf OnTimedEvent
myTimer.Interval = 60000
myTimer.Enabled = True
End Sub
Private Shared Sub OnTimedEvent(ByVal source As Object, ByVal e As System.Timers.ElapsedEventArgs)
If Minute(Now()) Mod 5 = 0 And Hour(Now()) >= 9 And Hour(Now()) <= 23 Then
Dim Star As New Shiyan
Call Star.XY_KJZ()
Call Star.XY_Star()
End If
End Sub
根本不运行呀,在VS里面自带的可以的。