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:
00156668
Vues:
44
Juan,

I just dropped 3 textboxes and a timer on a form. Put this Timer() method in:

debugout thisform.ActiveControl.Name

It works quite fine, as long as the form has focus. If you click on the command window for example the form loses focus and the references error out like you are seeing. So what is taking focus away from your form?

If you code it like:
if ( type( "thisform.ActiveControl.Name" ) != "U" )
   debugout thisform.ActiveControl.Name
endif
It at least won't error out when the form does not have focus. You might try turning on event logging to get a handle on what events are firing when it doesn't work.


>I am checking for the ActiveControl in a Timer.Timer Event. And yes, the timer is part of the form that I reference.
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