Information générale
Catégorie:
Codage, syntaxe et commandes
Hi Darrel!
'Till now, I didnot use/know the queryunload event. I tried it and works fine.
Secondly, Yes I also thougth about returning value from a modelles form. Would you write something about it? As I concluded, the biggest problem to decide the time, when comes the value back. So I dont use it.
BB
>
>Hi Bela,
>
>Ok, lets first address your closing issue. I believe that because it is a modal form, you can justify removing the close button from the window. If you do not want to do that you can put the following code in the Queryunload
>
>NODEFAULT
>thisform.Hide()
>
>Now onto your second issue. It really does not matter whether you are doing DO FORM or using CREATEOBJECT, the real issue is the fact that you are using a modal screen. If you are using a modal screen you can always use thisform.Hide() and then Release the form in the calling program.
>
>PROCEDURE ParentForm.LaunchChildForm
>LOCAL loForm
>loForm = CREATEOBJECT("ChildForm")
>loForm.Show(1) && Modal Child form
>lnRetVal = loForm.nRetVal
>loForm.Release()
>ENDPROC
>
>In fact you even do not need the loForm.Release() at the end as long as you have not put any cleanup code in the release method. When the procedure ends the local variable will be destroyed and the form will be released automatically as there are no other references to it.
>
>The much more tricky issue is returning a value from a modeless form. Many people will argue that you should never have to do this but I have found it useful in certain cases. If you are interested, let me know.
>
>Darrel
Précédent
Suivant
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