### Create Non-UI App with Timer

' Non-UI application (server application)
' Shows how to use a timer with startmessageloop
' Important is to kill the process to stop running
' 18-Jan-2015
Region Project Attributes
#MergeLibraries: True
End Region
`Sub Process_Globals
Private Timer1 As Timer
Private Counter As Int = 0
...
End Sub`
`Sub AppStart (Args() As String)
Log("Start at " & DateTime.Date(DateTime.Now) & " " & DateTime.Time(DateTime.Now))
Timer1.Initialize("Timer1", 5000)
Timer1.Enabled = True
' Keep on messaging - this is a must for Non-UI Apps
StartMessageLoop
End Sub`
' Handle timer tick events
`Sub Timer1_Tick
Counter = Counter + 1
Log(Counter & " = " & DateTime.Date(DateTime.Now) & " " & DateTime.Time(DateTime.Now))
End Sub`

Changed: , Category: Application, File: T6C159M1150.htm, ID: 1150