Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Ken Murphy
  Where is Ken Murphy?
 Springhill
 Canada
 Ken Murphy
 To: Andy Kramek
  Where is Andy Kramek?
 Hot Springs Village
 Arkansas - United States
 Andy Kramek
 Tags
Subject: RE: Form does not appear again
Thread ID: 154449 Message ID: 154625 # Views: 1 # Ratings: 0
Version: Visual FoxPro 9 Category: Forms
Date: Tuesday, December 18, 2007 12:57:15 PM         
   


> Ken
>
> > I stand corrected. Indeed, VFP can see the form's properties in the .Unload(), but it cannot see any of the controls. It would appear that when closing a form, VFP first releases all of the controls and then fires the .Unload(). I learned something here. Thanks.
>
> The actual sequence for Load is given by the acronym "LISA G" as follows:
> L = Load
> I = Init ()each control first, then Form last)
> S = Show
> A = Activate
> G = GotFocus (first control in the Tab order)
>
> For the Unload the equivalent sequence is dependent on HOW the form is released, as follows:
>
> [1] Form Release() called:
> R = Release
> D = Destroy (Form FIRST, then all contained controls in reverse of the Init order)
> U = Unload
>
> [2] Close button used:
> Q = QueryUnload
> D = Destroy (Form FIRST, then all contained controls in reverse of the Init order)
> U = Unload
>
> [3] Object Reference released (note that neither Release(), nor QueryUnload() are fired in this case):
> D = Destroy (Form FIRST, then all contained controls in reverse of the Init order)
> U = Unload
>
> In each case once the Form's Destroy fires there is no getting out of it, even a NODEFAULT will not stop the release process. Also, in each case, the form's DE does not get released until AFTER the form Unload - so tables are still available in the Unload as well as properties - but no controls.
>
> Regards
> Andy Kramek
> Microsoft MVP (Visual FoxPro)
> Tightline Computers Inc, Akron Ohio, USA

Andy,

As always, a good and proper explanation. Thanks. My rating to you also.

I was just in the process of starting some testing on this to see exactly what order things happened in when you noticed your post. I knew that I could see the form properties (usually what I use) but was unsure about the controls on the form (which are members of the form's .Objects collection.) It would appear that the .Objects collection is set to NULL (or what ever) at the enc of the .Destroy().

Ken
You shall know the truth - and the truth shall set you free. (John 8:33)

ENTIRE THREAD

Form does not appear again Posted by Saifuddin K Hussain @ 12/16/2007 8:29:05 AM
RE: Form does not appear again Posted by Ken Murphy @ 12/16/2007 2:14:02 PM
RE: Form does not appear again Posted by Saifuddin K Hussain @ 12/17/2007 10:37:58 AM
RE: Form does not appear again Posted by Ken Murphy @ 12/17/2007 12:49:02 PM
RE: Form does not appear again Posted by Tamar Granor @ 12/17/2007 10:28:58 PM
RE: Form does not appear again Posted by Ken Murphy @ 12/18/2007 12:31:20 PM
RE: Form does not appear again Posted by Andy Kramek @ 12/18/2007 12:49:46 PM
RE: Form does not appear again Posted by Ken Murphy @ 12/18/2007 12:57:15 PM
RE: Form does not appear again Posted by Bernard Bout @ 12/18/2007 2:29:34 AM
RE: Form does not appear again Posted by Saifuddin K Hussain @ 1/19/2008 1:19:04 PM
RE: Form does not appear again Posted by Bernard Bout @ 1/21/2008 7:46:22 AM
RE: Form does not appear again Posted by SAIFUDDIN HUSSAIN @ 1/23/2008 12:39:11 PM
RE: Form does not appear again Posted by Bernard Bout @ 1/24/2008 6:20:52 AM
RE: Form does not appear again Posted by SAIFUDDIN HUSSAIN @ 1/27/2008 12:55:39 PM
RE: Form does not appear again Posted by Ken Murphy @ 1/27/2008 2:05:38 PM