Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Odd behaviour with form return value
Message
De
11/03/2005 20:42:08
Alan Harris-Reid
Baseline Data Services
Devon, Royaume Uni
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Odd behaviour with form return value
Divers
Thread ID:
00995094
Message ID:
00995094
Vues:
55
Here's an odd one which I cannot explain...


I need to store a form's return value to a variable, which I do using the following code...

LOCAL lnFormValue
lnFormValue = .NULL.
DO MyForm TO lnFormValue && MyForm is a modal form

If I close the form by clicking on the cross in the top-right of the window, everything works ok and I end-up with the expected value for lnFormValue. However, if I close the form via a toolbar button, the resulting value of lnFormValue is still .NULL., and the form value is lost.

The close button Click() code is...
LOCAL loForm
loForm = _screen.activeform && form object reference

IF loForm.QueryUnload()
loForm.Release()
ENDIF

The Form.Unload() code contains
RETURN thisform.returnvalue
and I have checked that this code is being executed before control returns to the calling procedure.

Has anyone any idea how I can get my return value when closing the form via. a toolbar button? Any help would be appreciated.

Alan
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform