Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
THIS object reference
Message
General information
Forum:
Visual Basic
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00446918
Message ID:
00447011
Views:
14
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform