control-array

What's the simplest .NET equivalent of a VB6 control array?

Maybe I just don't know .NET well enough yet, but I have yet to see a satisfactory way to implement this simple VB6 code easily in .NET (assume this code is on a form with N CommandButtons in array Command1() and N TextBoxes in array Text1()): Private Sub Command1_Click(Index As Integer) Text1(Index).Text = Timer End Sub I know i...

How can I get the array index of a given object in C# with control arrays?

I am dynamically adding a bunch of controls to a form. Each control calls the same method, and in that method I need to know the array index of the the control that performed the action. CheckBox[] myCB = new CheckBox[100]; int i; for (i = 0; i < 100; i++) { myCB[i] = new CheckBox(); myCB[i].Text = "Clicky!"; myCB[i].Click +...

visual basic 2008 control arrays...

I'm looking at controlling properties of an array of buttons in VB 2008 (express). I have been looking at the sample code from a whitepaper at MS, and it kind of makes my head spin compared to what was done in VB6! (and yes I'm an amateur, so please forgive the poor coding and what is probably a simple question for the experienced here.....

How to create an array of buttons in C++

Hi, I'm using C++ in VS2005 and have an 8x8 grid of buttons on a form. I want to have these buttons in an array, so when I click on any of them it will open the same event handler (I think that is what they are called), but I will know the index of which one was clicked on. I know how to do this in VB and C#, but I can't seem to figure i...