Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Createobject() and returning a parameter
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00047277
Message ID:
00047745
Vues:
29
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
Fil
Voir

Click here to load this message in the networking platform