Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Way to pick up when ActiveControl changes
Message
 
To
05/07/2000 22:21:32
General information
Forum:
Visual Basic
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00388664
Message ID:
00388773
Views:
8
>I'm trying to figure out the best way to tell, at a form level, whenever the current control changes. In other words, I don't want to have to plug in code in all controls' LostFocus events.
>
>I tried storing the form as a class, so that I could access its internal properties such as ActiveControl via Edit Properties, and then added an ActiveControl_Assign event. But, this doesn't fire upon the internal changing of the property that occurs when a control changes.
>
>Any ideas on this one? Am I making sense? In more generic OOP terms, I basically want ActiveControl to raise an event when it changes.


You say: "I basically want ActiveControl to raise an event when it changes" but it won't help because controls already raise the LostFocus event and it doesn,t help since it is control-based instead of form-based.

One solution could be to add a timer control and check the Screen.ActiveControl on a regular basis!
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform