If you get bored reading this, just skip it and read the bold part
I'm adding some controls to my form with the Controls.Add method, but the problem that I have is that I dont know how to write events for them![]()
I am adding a whole buncha textboxes, I want them to act as control arrays but how can I tell my event what to handel?
here's an example of what I'm doing if I wasnt clear:
Now I want to add a sub so that if ANY of those textboxes are changed, I would be able to do something, just like a control array.VB Code:
Dim txtValues(30) As TextBox For i = 0 To 29 txtValues(i).Size = New System.Drawing.Size(textWidth, textHeight) txtValues(i).Name = "txtValue" & i Next Me.Controls.AddRange(txtValues)
This is simple if I was doing it during design time, but since I'm adding the controls at runtime I dont know how to add the events for them![]()
the bold part is my problem I guess![]()





Reply With Quote