Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can I tell what object on a form has the current focus
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00288577
Message ID:
00289114
Vues:
25
>CHEAP TRICK 33
>public ThisControlHasFocus
>
>in the controls Gotfocus:
>ThisControlHasFocus=this.name
>
>in the control's Lostfocus:
>ThisControlHasFocus=[None]

Using public variables in forms is generally a Bad Thing. What if you run this form twice?

If you have to use this technique, instead of ThisForm.ActiveControl, it's much better to create a custom form property (Form menu: New Property). That way, it's scoped to the form. Mike Helland explains above what else is wrong with this technique...
My blog
My consulting page
My home page

Member of the Trim Your Auto-Quote Campaign!
What's another word for thesaurus?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform