Results 1 to 4 of 4

Thread: [RESOLVED] [2005] Control arrays

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Sep 2006
    Posts
    160

    Resolved [RESOLVED] [2005] Control arrays

    In VB6 you could make arrays of controls, and so, easily use arrays of variables with just the Index argument.

    I know it's possible to make different events handle the same sub, and use the Sender object to know which control made the event to fire, but that's not as handy.

  2. #2
    PowerPoster
    Join Date
    Aug 2005
    Location
    College Station, TX
    Posts
    4,521

    Re: [2005] Control arrays

    Search for Control Arrays in this .NET forum and you should get several threads regarding this, as it has been answered multiple times before...

  3. #3
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,109

    Re: [2005] Control arrays

    You can make arrays of controls in VB.NET, too, though they are not necessarily quite the same as VB6. A control is an object, an array can be set up with any type of object, so an array of controls is entirely possible. However, this may be one of those situations where VB6 made things more streamlines than VB.NET. There are plenty of cases like that, but it always arose from VB6 sacrificing versatility for simplicity. That's not always a bad trade-off, unless you need that versatility, but versatility can sometimes mean that you need to do a bit more work.
    My usual boring signature: Nothing

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Sep 2006
    Posts
    160

    Re: [2005] Control arrays

    Quote Originally Posted by gigemboy
    Search for Control Arrays in this .NET forum and you should get several threads regarding this, as it has been answered multiple times before...
    You are right, and indeed it's what I'm used to do, but I guess writing a sunday soon after going out a saturday's night doesn't help much heh. I apologize.

    Well, from what I've seen the old array system is fully gone then, and the best way of grouping events and variables is similar to what I've been doing so far.

    Thanks for the help.

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