Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Way to pick up when ActiveControl changes
Message
Information générale
Forum:
Visual Basic
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00388664
Message ID:
00388773
Vues:
9
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform