Results 1 to 6 of 6

Thread: index with .net

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2002
    Location
    Canada
    Posts
    455

    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.

  2. #2
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    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) .

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2002
    Location
    Canada
    Posts
    455
    Hello Pirate,

    Thanks for the information.

    Michelle.

  4. #4
    Addicted Member MasterBlaster's Avatar
    Join Date
    Jul 2002
    Location
    Seattle
    Posts
    196
    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

  5. #5
    Frenzied Member
    Join Date
    Oct 2002
    Location
    Gammapolis
    Posts
    1,474
    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

  6. #6
    Addicted Member MasterBlaster's Avatar
    Join Date
    Jul 2002
    Location
    Seattle
    Posts
    196
    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
  •  



Click Here to Expand Forum to Full Width