Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Stefan Wuebbe
  Where is Stefan Wuebbe?
 Hamburg
 Germany
 Stefan Wuebbe
 To: Khurram Tahir
  Where is Khurram Tahir?
 Karachi
 Pakistan
 Khurram Tahir
 Tags
Subject: RE: QueryUnLoad() Not Run on Release()
Thread ID: 310915 Message ID: 310943 # Views: 46 # Ratings: 1
Version: Visual FoxPro 9 Category: Forms
Date: Monday, June 27, 2011 11:50:37 AM         
   


> From Help i come to know the following
>
> The QueryUnload event does not occur if you issue the RELEASE command on the form in code or invoke the form's Release method.
>
>
> Forms Closing through Exit command button and form closeable property set to .F. what is the best alternative of QueryUnload()method of form in that case
>
> one thing is that putting thisform.Queryunload() before thisform.release() in all forms any other option


I would not do so in every single form but in their custom ParentClass.
So myFormClass.Release() as well as myFormClass.QueryUnload() would both be calling a 3rd, custom method, probably a hidden one, say myFormClass.ReadyToRelease(), which would either return True or False.
So that Release() as well as QueryUnload() would know what to do - but since the two are different, their reusable code would not be exactly equal.



hth
-Stefan

ENTIRE THREAD

QueryUnLoad() Not Run on Release() Posted by Khurram Tahir @ 6/27/2011 9:18:47 AM
RE: QueryUnLoad() Not Run on Release() Posted by Stefan Wuebbe @ 6/27/2011 11:50:37 AM
RE: QueryUnLoad() Not Run on Release() Posted by George Kelly @ 6/27/2011 12:36:01 PM