Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can VFP6 run in background?
Message
From
21/03/2001 18:08:58
 
 
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00486603
Message ID:
00487440
Views:
9
Thx. This will have no interface whatsoever. Will be triggered by a task scheduler in the morning and only be open for 3 hours of so awaiting the incoming file.

I already have a pilot done today using a timer. Haven't tried the Sleep() option yet but I see it as a cleaner option. With the timer I have a longer prg (there is no UI), and it is OOP, with instantiation of a timer subclass and setting properties, etc.

I see Sleep as cleaner for this very small app as I could just do a simple Do While .T., check if the 3 hours expired (then quit), check if the file arrived and process it (then quit), else Sleep() for a few minutes and enddo.

How does it sound?

>>>>>>>>>>>>>>>>>
Sleep() burns no cycles while the API call is in effect, but VFP won't respond to any UI events in the interval that Sleep() is in effect, either, so you have to decide which is more important, responding to UI events or not eating some CPU cycles while idling along between checks for the file arriving.
>>>>>>>>>>>>>>>>>


Alex Feldstein, MCP, Microsoft MVP
VFP Tips: English - Spanish
Website - Blog - Photo Gallery


"Once again, we come to the Holiday Season, a deeply religious time that each of us observes, in his own way, by going to the mall of his choice." -- Dave Barry
Previous
Reply
Map
View

Click here to load this message in the networking platform