Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
_SCREEN.ActiveForm Bug / Inconsistency
Message
From
22/01/1999 04:00:24
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
_SCREEN.ActiveForm Bug / Inconsistency
Miscellaneous
Thread ID:
00178859
Message ID:
00178859
Views:
57
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
Next
Reply
Map
View

Click here to load this message in the networking platform