VB .NET control arrays

Soldato
Joined
18 May 2004
Posts
2,894
Location
Lincoln, Uk
I'm trying to migrate from VB 6 to VB.net 2010...

I'm really at a loss how to do some of the things i want to without a control array which it doesn't seem to have anymore :(

Say as an example I had 25 buttons, and 25 text boxes lined up next to each other and I wanted to have the program put in the text box next to the button clicked "<- YOU JUST CLICKED THIS BUTTON"), in VB 6 it would be easy, I would just create two control arrays one of buttons, one of text boxes and use the index value to set the property on the right text box, how do you do it in VB.net :mad:

Thanks in advance
 
Use one subroutine that handles all of the the buttons and when you click the button it passes a variable called sender which is the button that was clicked. Just check for sender.name in a select case routine and put all the code there. Email me is that isn't clear enough.
 
Back
Top Bottom