Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
THIS object reference
Message
Information générale
Forum:
Visual Basic
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00446918
Message ID:
00447011
Vues:
9
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>This aspect of VB really sucks. I have been useing ME.ActiveControl as a marginal substitute for controls.
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>
>Just a note -- you will lose some of the speed gains of early binding under this approach (which may be why there is no "THIS" to begin with). In other words, at run-time (and compile time, in fact) VB knows that "Me.ActiveControl" is a control, but it then needs to check what kind of control in order to validate the action you are taking. But, if you reference a control more explicitly ("txtLastName") VB knows it is a control, and also that it is a text box. One less check for it to make.
>
>Also, as a result of this, the intellisense will be "smarter." That's quite secondary in my opinion, though.

Thanks for the heads up.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform