Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to determine whether a textbox is having focus?
Message
From
22/12/2010 04:03:35
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
22/12/2010 03:13:28
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01493326
Message ID:
01493568
Views:
76
>>>>>Have you tried testing thisform.ActiveControl.name ?
>>>
>>>Why would you compare the name? Compare the reference to avoid the problems you mention no? I've used this approach in many apps and it works well enough...
>>
>>Checking thisform.ActiveControl for null and then checking thisform.ActiveControl=this should suffice, like I said below.
>>
>
>thisform.ActiveControl can't become null.
>VFP fires an error when ActiveControl is not defined ( a bad design ! )

Yes, now I remember. That part of the framework was done with and buried long ago - try/catch to get a reference to it, or return a null if it won't. Bad design, indeed.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform