Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Return value from a Form
Message
De
26/07/2011 09:52:09
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
26/07/2011 00:42:58
Yim Ming Sun Derek
Spacious Design Consultant
Hong Kong, Hong Kong
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01333380
Message ID:
01519178
Vues:
61
>Hi,
>
>How to Hiding a modal form and get the return value to the calling form ?

The form needs to be in a vcx, not scx (maybe not, but easier this way). In the form's unload() or whichever code is called by the close button, set a property of the form, and instead of thisform.release() issue a thisform.hide(). The calling then looks like this:
loFrm=createobject("mymodalformclass")
loFrm.show()

?loFrm.myProperty
release loFrm
IOW, this way the form object reference doesn't go away when you close it - it's just hidden, but alive and accessible. The advantage over returning a value from form.unload() is that you can access multiple properties. In that case, though, you can return multiple values if you package them into properties of an object (a collection, perhaps) and return that object. The way I described here, you don't need to package anything.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform