Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Form crashes foxpro
Message
 
To
21/09/2001 09:43:14
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00559199
Message ID:
00562265
Views:
27
>Thank you for your suggestion. I will try to remove some parts of the form, though that is, unfortunately, a massive job.
>
>As for your timer question, I don't quite follow. My timer is set to check every second if a flag has been set. If so, then I run ThisForm.Release and ThisFormSet.release. Where does the enabled property come into play?

Hi Lev,

You don't really need a timer for this. You can get away with a modal child form and passing it a reference to the calling form.

I will assume that the child form is called from a button's click. I am calling your flag "lCloseThisForm":

click event:
do form child_form with Thisform
if ThisForm.lCloseThisForm = .t.
    ThisForm.Release()
endif
in the child form's init:
lParameters toCallingForm
with ThisForm
    .AddProperty( "oCallingForm")
    .oCallingForm = toCallingForm
endwith
Then, wherever it is that you determine that the parent form must be closed:
ThisForm.oCallingForm.lCloseThisForm = .t.
When the child form's released, the parent form will close itself.

Another option would be to have the child form return a value upon release (child form's Unload event will do this for you) and have the calling form act based on that value.

Alex
Low-carb diet not working? Try the Low-food diet instead!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform