Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
No luck using FORM.ActiveControl
Message
From
10/11/1998 11:56:12
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00156203
Message ID:
00156209
Views:
41
>In VFP6, I have been trying to determine what the active control in a form is and have had no luck at all!
>
>I have checked the latest MSDN as well as, the Nov 1998 Tech Net which labels this as a problem dating back to VFP 3.0.
>
>According to the syntax below, I should be able to determine which object has focus:
>
>THISFORM.ActiveControl.Name
>
>Has anyone ever had to deal with this? If so, is there a way to work around this MS feature?
>
>Thank you

It's supposed to work within a form, but will not work outside a form. So, generic way to handle this is to have Form.LastActiveControl property, and all form controls (subclass) may have Thisform.LastactiveControl=This in their GotFocus event. Also, you should add This.LastactiveControl=.NULL. to Form.Destroy event.
Edward Pikman
Independent Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform