Information générale
Catégorie:
Gestionnaire d'écran & Écrans
>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!
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement