Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
No luck using FORM.ActiveControl
Message
De
10/11/1998 11:56:12
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00156203
Message ID:
00156209
Vues:
37
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform