Page 1 of 1

[Solved] Not end

Posted: Saturday 21st March 2020 11:09am
by Philippe734
Hello,
My program has no form and begin with a module, which start a timer within a class named stuff :
Public tTimer As New stuff As "stuffrun"
Public Sub Main()  
  tTimer.Start  
End
The timer start well, but just for one cycle, then my program is stop when the line "End" is reached of the main module. How to not stop (quit) the program and let the timer do its job until my program stop the timer ? Where to put the line below ?
...
  tTimer.Stop
...

Re: Not end

Posted: Saturday 21st March 2020 12:59pm
by cogier
Can you provide an example program for us to look at. I can't see what's in 'stuff'.

This works: -
tTimer As Timer

Public Sub Main()

  tTimer = New Timer As "tTimer"
  tTimer.Start

End

Public Sub tTimer_Timer()

  Print Str(Time(Now))

End

Re: Not end

Posted: Sunday 22nd March 2020 6:08pm
by Philippe734
You're right, I was in the mistake. Thanks !