Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: onytoo
  Where is onytoo?
 Padang
 Indonesia
 onytoo
 To: Frank Smith
  Where is Frank Smith?
 Houston
 Texas - United States
 Frank Smith
 Tags
Subject: RE: Background program
Thread ID: 345092 Message ID: 345101 # Views: 81 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Errors & Debugging
Date: Friday, May 18, 2012 10:34:08 AM         
   


> I want a program to run continuously in the background.
> Sample code is:
>
> _screen.AddObject('MyTimer','MyTimer')
> _screen.Visible = .F.
>
> DEFINE CLASS mytimer as Timer
>
> * Interval is in milliseconds.
> interval = 60000 * 3
> FUNCTION Timer
> WAIT WINDOW 'running clean ' TIMEOUT 120
> DO clean.prg
> ENDFUNC
>
> ENDDEFINE
>
> It appears that the program does not run continuously
> What did I leave out?


Because I don't see it or you forgot to type here then I assume you need

_screen.AddObject('MyTimer','MyTimer')
_screen.Visible = .F.
*!* keep VFP alive here!
READ EVENTS



Regards,
Onytoo

ENTIRE THREAD

Background program Posted by Frank Smith @ 5/18/2012 2:36:21 AM
RE: Background program Posted by onytoo @ 5/18/2012 10:34:08 AM
RE: Background program Posted by Stefan Wuebbe @ 5/18/2012 10:39:42 AM
RE: Background program Posted by Frank Smith @ 5/18/2012 4:15:33 PM
RE: Background program Posted by Bernard Bout @ 5/22/2012 3:38:09 PM