Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
_SCREEN.ActiveForm Bug / Inconsistency
Message
De
22/01/1999 04:00:24
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Titre:
_SCREEN.ActiveForm Bug / Inconsistency
Divers
Thread ID:
00178859
Message ID:
00178859
Vues:
58
My framework uses a toplevel form instead of _SCREEN. When the toplevel form is activated, _SCREEN.ActiveForm returns the correct object reference to the toplevel form.

The same holds true with other modeless child forms which are activated on top of the toplevel form and when I shift focus between these child forms (firing the form's Activate event), _SCREEN.ActiveForm will always return the correct active form's object reference.

The problem occurs when I shift focus back to the toplevel form after a child form has been activated. _SCREEN.ActiveForm will always return the reference to the last child form activated even after the toplevel form's Activate event has fired and now has focus.

Since I need a reference to the current active form, my solution is the following code in Activate event of the form base class:

IF VARTYPE(goApp) = "O" AND NOT goApp.oActiveForm = This
goApp.oActiveForm = This
ENDIF

If anyone has a more elegant solution (or if I'm missing something) please let me know.
- Jeff
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform