Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Hidden form with timer
Message
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00587229
Message ID:
00587704
Views:
39
>>I want to make sure foxpro closes all databases each night, so I put a timer on a form and setup a macro that loads with VFP5.0 and loads the form with the timer and hides it. The problem now is that when i browse any table it opens places the data in the hidden form and makes it visible (as the browse window).
>>
>>How can I hide the form and keep it from being the "browse window"?
>
>From your message I don't see why you need a form. You can create a timer based class and instaniate it w/o form.

You can create in code like this
PUBLIC oTimer
oTimer = CreateObj ("Mytimer")
*...
* -------------------------------------------
Define Class Mytimer as Timer

Name   = "Mytimer"
Procedure Timer
  This.Enabled = .F.
 
  * Your processing here

  This.Enabled = .T.
EndProc

Procedure Init
  This.Interval = 60 * 1000   && 60 seconds
  This.Enabled = .T.
EndProc

 EndDefine
Or you can do this in the Class Designer
CREATE CLASS mytimer of myclasslib as timer

*...
oTimer = Newobject ("Mytimer", "myclasslib")
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform