Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
No luck using FORM.ActiveControl
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00156203
Message ID:
00156655
Vues:
41
Juan,

But where are you checking ActiveControl? The Timer event of a timer? Is the Timer a member of the same form? A method of a Toolbar? The place you are running the code from may be what's making ActiveControl invalid. I was trying to give you an alternative to having to track the current control with a separate property and the complexity it causes.

>I am currently attempting this with an Edit Control. However, it appear that what ever object I try this with it fails.
>
>I have tried _SCREEN.ActiveForm and I can get the name of the form in focus. Although, if I were to go a little further and issue a _SCREEN.ActiveForm.ActiveControl I never get a reference to the currently focused object.
>
>As a work around, I've implemented something that Edward Pikman recommended. Eds approach was to create a property on the form to keep track of the last focused object, and in every object's GotFocus event, update that form property.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform