Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Close button & Release method
Message
 
To
11/04/2002 13:30:37
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00643849
Message ID:
00643851
Views:
8
>It appears that when a form is closed using the Close button that the Release method doesn't get invoked. I know that I can disable the close button and force the user to close via a button I design or a menu choice. Is there a way to force the release event, or alternatively, simulate the Close button even though the form.closable property is set to false?

In the QueryUnload() event, add NODEFAULT to prevent the form from being closed. Generally, code like this, usually in a command button is used in conjunction with QueryUnload.
* In QueryUnload
LOCAL lloktoclose
lloktoclose = < Logical condition >
IF NOT lloktoclose
  NODEFAULT
ENDIF
RETURN lloktoclose

* Command button Clink

IF ThisForm.QueryUnload()
  ThisForm.Release
ENDIF
George

Ubi caritas et amor, deus ibi est
Previous
Reply
Map
View

Click here to load this message in the networking platform