|
-
Jul 16th, 2003, 03:31 PM
#1
Thread Starter
Hyperactive Member
index with .net
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.
-
Jul 16th, 2003, 03:48 PM
#2
Sleep mode
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 ) .
-
Jul 17th, 2003, 01:39 AM
#3
Thread Starter
Hyperactive Member
Hello Pirate,
Thanks for the information.
Michelle.
-
Jul 17th, 2003, 02:08 PM
#4
Addicted Member
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.
"And most of the evils of society can, in fact, be cured through information. We have a society that has been disinformed and based on the disinformation has made irrational choices. And that's what I mean by 'ignorance.' People, who ordinarily might be smart, are deprived of the data by which to make a rational decision, don't have the data to do it."
Frank Zappa
-
Jul 17th, 2003, 02:54 PM
#5
Frenzied Member
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.
The form itself is a container and you can refer to the controls in the controls collection by index.
'Heading for the automatic overload'
Marillion, Brave, The Great Escape, 1994
'How will WE stand the FIRE TOMORROW?'
Eloy, Silent Cries and Mighty Echoes, The Vision - Burning, 1979
-
Jul 17th, 2003, 03:54 PM
#6
Addicted Member
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.
"And most of the evils of society can, in fact, be cured through information. We have a society that has been disinformed and based on the disinformation has made irrational choices. And that's what I mean by 'ignorance.' People, who ordinarily might be smart, are deprived of the data by which to make a rational decision, don't have the data to do it."
Frank Zappa
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|