Dear VB .net users,
In VB6 it was normal for us to create buttons with indexes. On an easy way you could find out which button was pressed.
What do we have to do to get a kind of index with .net?
Nice regards,
Michelle.
Printable View
Dear VB .net users,
In VB6 it was normal for us to create buttons with indexes. On an easy way you could find out which button was pressed.
What do we have to do to get a kind of index with .net?
Nice regards,
Michelle.
If you mean array of controls (buttons or whatever control) , this is changed in .NET (I know it was in VB6. It was cool anyway:D) .
Hello Pirate,
Thanks for the information.
Michelle.
The closest thing to creating arrays of controls is to use containers. If you draw controls on ,say a panel control, you can look at the panel control's Controls collection object. It's not an "array" but a collection is just as easy to work with.
The form itself is a container and you can refer to the controls in the controls collection by index.Quote:
Originally posted by MasterBlaster
The closest thing to creating arrays of controls is to use containers. If you draw controls on ,say a panel control, you can look at the panel control's Controls collection object. It's not an "array" but a collection is just as easy to work with.
gotcha.;) Just using a the panel as an example. Actually, even a textbox can act as a container. comes in pretty handy when you creating custom controls.:cool: