title: How to associate all textbox controls on a form with the same event handler
body: <p>VB 2008.</p>
  
  <p>I have several text boxes on a form and I want each of them to use the same event handler. I know how to manually wire each one up to the handler, but I'm looking for a more generic way so if I add more text boxes they will automatically be hooked up to the event handler.</p>
  
  <p>Ideas?</p>
  
  <p>EDIT: Using the C# sample from MusiGenesis (and with the help of the comment left by nick), I wrote this VB code:</p>
  
  <pre><code>Private Sub AssociateTextboxEventHandler()
    For Each c As Control In Me.Controls
      If TypeOf c Is TextBox Then
        AddHandler c.TextChanged, AddressOf tb_TextChanged
      End If
    Next
  End Sub
  </code></pre>
  
  <p>Thanks a lot! SO is great.</p>