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: Tamar Granor
  Where is Tamar Granor?
 Elkins Park
 Pennsylvania - United States
 Tamar Granor
 Tags
Subject: RE: Form does not appear again
Thread ID: 154449 Message ID: 154615 # Views: 1 # Ratings: 0
Version: Visual FoxPro 9 Category: Forms
Date: Tuesday, December 18, 2007 12:31:20 PM         
   


> > I did notice a few things though. First, the PUBLIC variable RetVal. You do not need to use a public variable here. In your form's .Unload, you can use a local variable:
> >
> > LOCAL lnRetVal
> > lnRetVal = ThisForm.SomeTextBox.Value
> > RETURN lnRetVal
> > 

> >
>
> Actually, Ken, by the time he gets to Unload, he can't refer to a property of a control. The right way to do this is to add a property to the form, set it at an appropriate time (like when the relevant value changes), and return that property in Unload.
>
> Tamar

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.

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