Reviving the Control Array
I really enjoyed the control array in VB6 but the book tells me that it is no longer the same and does not go into how to recreate the same operation in VB2008. The "Help" option doesn't...
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Sam HobbsRank #107 · 20.5K reputationPosted Nov 23, 2009, 6:29 PM EST
Emerogork17 reputationPosted Nov 26, 2009, 2:45 PM EST
For now, I am stuck with the book that was purchased for the course.
However, I just discovered in the index that the concept of the "Control Array" is not listed but the "Array Control" is.
Maybe someone should tell the DDOTS that write the book that an entry for Control Array should say "See Array Control". (-: No wonder I did not see it. From a simple glance, it looks to be about 90% of what it was in VB6.
I may have solved my own problem here...
Kirtan PatelRank #292 · 8.6K reputationPosted Nov 26, 2009, 4:56 PM EST
just tell me What you exactly want to Do with Control just tell me may be i can help you :)
Emerogork17 reputationPosted Nov 26, 2009, 6:05 PM EST
I may not be using the proper terminology here but I do have one working enough to continue experimenting. My professor says that if I add things beyond the what is covered in the course, I can boost my grade for the project to the "A" level. I am going to use it to switch off all the objects on the display when I one hits the "Off" button.
Thanks for the offer though...
Emerogork17 reputationPosted Nov 27, 2009, 9:02 PM EST
I thought I had read that one could use a manipulate objects of differing type by usaing a single array. For example, if I had a form with many buttons and many text boxes. I could use one control array to enable/disable them in one felled swoop. All examples I see seem to imply that the control array has to be of one type and is dimensioned as such.
I wonder if there is any such thing as a multi-dimensional control array...?
This makes me wonder that if I did try to create one, then I would be tampering with the space time continuum...
Maybe they did not have to create the hadron collider at all...
Sam HobbsRank #107 · 20.5K reputationPosted Nov 28, 2009, 7:46 AM EST
For example, if you need an array for all controls in a form, then you don't need to create one; the form has a list of controls that you can use.
Another possibility is the collections in the System.Collections Namespace. They allow items of various types. The classes in the System.Collections.Generic Namespace require that all items be the same type. It is much better to use objects that require a specified type; software is usually designed better when they do. It is more work, but it is usually a better design.
You could create a class that has collections for each type of control, and then you could use generic collections.
It depends on what you need to do.