Information générale
Catégorie:
Codage, syntaxe et commandes
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement