Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
No luck using FORM.ActiveControl
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00156203
Message ID:
00156668
Views:
47
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform