Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Defensive programming...
Message
From
06/06/2002 15:36:26
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00665394
Message ID:
00665656
Views:
24
This message has been marked as the solution to the initial question of the thread.
>Thanks - returning .f. does the trick to a degree but I really want to clear events as well so that the program closes - it doesn't seem that clear events can be called in the load event of a form or it doesn't appear to be taken notice of! I step through my code and the return .f. brings me back to my read events command (even if I issue clear events just before return .f. Any ideas? and thanks again

If you have a calling routine, when you stop instantiation of the form you could set an oApp property or a global variable property to indicate the application shoudl be exited, then issue CLEAR EVENTS, e.g. in the form Init
IF THISFORM.CancelFormLoad
    oApp.ShutTheAppDown = .T.
    RETURN .F.
ENDIF
Then in the calling routine:
IF oApp.ShutTheAppDown
    ...   && Clean up etc.
    CLEAR EVENTS
ENDIF
Again you probably need to massage it for your scenario, but you get the idea.

Bill
William A. Caton III
Software Engineer
MAXIMUS
Atlanta, Ga.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform