I have a dynamic array of textboxes in VB.NET. How do I use the events available to textboxes, e.g., Click? From searching, I think AddHandler is used but I dont know how.
If you dont know what Im talking about, what I mean is when you create a textbox in the designer you can access an event by going to the code section and selecting the name of the textbox in the first drop down menu and selecting the event in the second drop down menu, then code like this is put in for you:
Obviously you dont have that when creating a textbox (or in my case, an array of textboxes) later on in the project.
If you dont know what Im talking about, what I mean is when you create a textbox in the designer you can access an event by going to the code section and selecting the name of the textbox in the first drop down menu and selecting the event in the second drop down menu, then code like this is put in for you:
Code:
Private Sub TextBox1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox1.Click
End Sub