Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP5: Shutting Down Application from Timer
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00011835
Message ID:
00012153
Views:
37
>>SITUATION:
>>==========
>>My application has a single formset with a timer on it that checks
>>data files periodically.
>>
>>Periodically, the Timer decides that the application should shut down,
>>and tries to terminate the application.
>>
>>PROBLEM:
>>========
>>If the timer RELEASEs the application or even calls CLEAR EVENTS to
>>try and let the application release itself, VFP GPFs. HOWEVER, VFP
>>does not GPF and DOES exit properly when running as an EXE from inside
>>of the Visual Foxpro Environment.
>>
>>HELP?
>>
>>pol@ix.netcom.com
>
>Try to cleanup the problem.
>1. Do you include READ EVENTS command? If your formset is Modal you actually don't need in READ EVENTS.
>2. How do you Release? It's better first Release Thisformset and then Clear Events.
>3. It's also safe to 'back' timer before you release:
> ThisTimer.enabled=.f.
> release thisformset

The main application object, which launched the form (which is not modal) has a READ EVENTS.

The Timer event first sets
THIS.Interval = 0

then, to shut down, it sets
THIS.enabled = .F.
RELEASE THISFORMSET
CLEAR EVENTS
-------------------------------
Pol Stafford
pol@ix.netcom.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform