Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
_SCREEN.ActiveForm Bug / Inconsistency
Message
From
22/01/1999 14:20:45
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00178859
Message ID:
00179148
Views:
31
Yes - interesting you asked. I quess I could restrict it's usage to that of an application workspace (with no objects). I have thought about that. Hmmm.


>Does your top level form contain any objects? If not, It wouldn't receive focus (I suppose)
>
>>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
Previous
Reply
Map
View

Click here to load this message in the networking platform