Please no no no no say it isnt so
If a compelling reason exists to make the change, the simplest way to do it
would be to derive a text box class from the system text box, and handle it
in your derived class. Then use that class instead of the textbox class
provided by the framework.
But again, think twice before doing it.
Pete
"William" <wne...@4psp.com> wrote in message
news:072801c31419$20c70e40$3001...@phx.gbl...
I am assuming that you are talking about a text controls... Why don't you
just write a generic event handler for each control type (text, list, etc.)
and assign it to many events:
Example:
Private Sub txtBody_Enter(ByVal sender As Object, ByVal e As
System.EventArgs) _
Handles txtBody.GotFocus, txtBudgetCode1.GotFocus, ETC....
'your code here
End Sub
Cheers,
Lubos
"William" <wne...@4psp.com> wrote in message
news:072801c31419$20c70e40$3001...@phx.gbl...
"Lubos Hrasko" <lu...@NO-microcafe.net-SPAM> wrote in message
news:e9WYabCF...@TK2MSFTNGP10.phx.gbl...
Jakob.
The subs:
---------
Private Sub addTextboxHandlers()
Dim t As TextBox
For Each t In Me.Controls
AddHandler t.GotFocus, AddressOf
TextBoxes_GotFocus
Next
End Sub
Private Sub TextBoxes_GotFocus(ByVal sender As
Object, ByVal e As System.EventArgs)
Dim txt As TextBox = CType(sender, TextBox)
With txt
.SelectionStart = 0
.SelectionLength = 0
End With
End Sub
>.
>