Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Do an unload in the load event?
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00148006
Message ID:
00148011
Views:
23
Kevin,

If have to test the condition in the Load you'll have to set a custom form property (like lDontLoad) and test that in the Form.Init() or you can just do the test in the Init()

Dodefault()
if ( this.lDontLoad )
return .f.
endif

* rest of form.init here

The only thing is that all of the controls of the form will have been already created. If the condition you are trying to avoid in the Load() may cause problems with the controls themselves the controls will have to be smart enough to handle the scenario.

>I'm always trying to fit everything in one single form (without an associated .prg), so please indulge my mania <grin>.
>
>In the load event of a form, I'm testing a variable and if "false" then I don't want to load the form. I can't call the unload event, and I've "RETURN 0" but neither work.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Reply
Map
View

Click here to load this message in the networking platform