[Solved] Not end

Post

Posted
Rating:
#1 (In Topic #387)
Avatar
Regular
Philippe734 is in the usergroup ‘Regular’
Hello,
My program has no form and begin with a module, which start a timer within a class named stuff :

Code (gambas)

  1. Public tTimer As New stuff As "stuffrun"
  2. Public Sub Main()  
  3.   tTimer.Start  
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 ?

Code (gambas)

  1. ...
  2.   tTimer.Stop
  3. ...

 Linux & Android enthusiast - France
Online now: No Back to the top

Post

Posted
Rating:
#2
Avatar
Guru
cogier is in the usergroup ‘Guru’
Can you provide an example program for us to look at. I can't see what's in 'stuff'.

This works: -

Code (gambas)

  1. tTimer As Timer
  2.  
  3. Public Sub Main()
  4.  
  5.   tTimer = New Timer As "tTimer"
  6.   tTimer.Start
  7.  
  8.  
  9. Public Sub tTimer_Timer()
  10.  
  11.  
Online now: No Back to the top

Post

Posted
Rating:
#3
Avatar
Regular
Philippe734 is in the usergroup ‘Regular’
 You're right, I was in the mistake. Thanks !

 Linux & Android enthusiast - France
Online now: No Back to the top
1 guest and 0 members have just viewed this.