Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help!! Returning back to the calling form
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00261260
Message ID:
00261289
Vues:
26
>>William,
>>
>>Your assumption is correct. Currently on the second form, I have the min, max, and cancel options of a screen set to False. I wanted a user to select a button that will allow them to exit the second form and return back to the calling form.
>>
>>I'm trying to duplicate the cancel button into a command button on the form.
>
>Hi Edgar,
>
>If the form being called is modal (WindowType = 1), execution in the calling form is suspended until the called form is either hidden or released. You can have a modal form return a value, but more typically (I think), this situation is handled something like this:
>LOCAL loForm
>DO FORM MyForm.SCX NAME loForm LINKED
>* The following isn't executed until the form is hidden or released
>IF VARTYPE(loForm) = "O" AND NOT ISNULL(loForm)
>  * Do whatever, the user didn't cancel.
>  * Finally when done
>  loForm.Release
>ENDIF
>If you have a close box (the X in the upper right hand corner) or a Cancel command button that issues ThisForm.Release, the code in the IF...END block won't execute.

Edgar,
The thing you have to remember is when you call a modal, the parent form stops processing. When calling a non modal, execution continues in the parent (any one feel free to call me to the carpet on this). In either case, your user should be able to come back to the parent form PROVIDED the child is released. I'd make sure the close button in the child runs some code like:

ThisForm.Release
Oct 31 = Dec 25
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform