Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Releasing a form
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00125553
Message ID:
00125763
Views:
14
>If I am writing code in the .init of a listbox and I want to release the form, What is the correct method of doing this? I tried
>
>thisform.release
>nodefault
>
>this did not work, the form loaded anyway.

You cannot RELEASE the form until it´s been INITialized. You could add a property (DoNotInit) and in the listbox you could then write

ThisForm.DoNotInit=.T.

After, in the Init method of the form, write

RETURN ThisForm.DoNotInit

and the form will not load.

(Note, anyway, that all other objects will execute their INIT methods. You cannot prevent that, but if all INITs begin with

IF ThisForm.DoNotInit
RETURN .F.
ELSE
....your code here
ENDIF

it will be faster.

HTH!
Previous
Reply
Map
View

Click here to load this message in the networking platform