General information
Category:
Forms & Form designer
>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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only