private sub myDoubleClick(byval sender as object, byval e as
System.EventArgs) handles _
textbox1.DoubleClick, textbox2.DoubleClick, textbox3.Doubleclick
'your common doubleclick handling code here
end sub
Or...
private sub myDoubleClick(byval sender as object, byval e as
System.EventArgs)
'your common doubleclick handling code here
end sub
AddHandler textbox1.DoubleClick, AddressOf myDoubleClick
AddHandler textbox2.DoubleClick, AddressOf myDoubleClick
AddHandler textbox3.DoubleClick, AddressOf myDoubleClick
in the second method, you could loop through all your controls, check
whether its a textbox
and then use AddHandler.
something like...
for each oControl in Me.Controls()
if typeOf oControl is TextBox then
AddHandler oControl.DoubleClick, AddressOf myDoubleClick
end if
next oControl
the syntax for the above might me wrong...sorry. Just wanted to give you the
idea..
hope this helps..
Imran.
"Kim C" <ki***@cox.net> wrote in message news:EaeOc.137$73.30@lakeread04...
I have several textboxes and I want one dbl click handler to be used for
all of the textboxes. How do I get all of the text boxes to use the same dbl
click
handler?
Kim