65.9K
CodeProject is changing. Read more.
Home

Multiple Event Handling for the Lazy Ones

starIconstarIconstarIconstarIconstarIcon

5.00/5 (1 vote)

May 25, 2011

CPOL
viewsIcon

6634

why not just create a custom handler for all the textboxes? addhandler textbox1.textchanged, addressof textchangedhandler addhandler textbox2.textchanged, addressof textchangedhandler .... 'add additional textbox handlers .... addhandler textbox7.textchanged, addressof...

why not just create a custom handler for all the textboxes?
 addhandler textbox1.textchanged, addressof textchangedhandler
 addhandler textbox2.textchanged, addressof textchangedhandler
 ....
 'add additional textbox handlers
 ....
 addhandler textbox7.textchanged, addressof textchangedhandler
For the customer handling routine
 private sub TextchangedHandler(ByVal sender As System.Object, ByVal e As System.EventArgs)
  '....
  'Do sub code
  '....
 end sub