Results 1 to 4 of 4

Thread: array for command buttons

  1. #1

    Thread Starter
    Fanatic Member damasterjo's Avatar
    Join Date
    Nov 2005
    Location
    In front of my Comp DirectX7 EXpert
    Posts
    827

    array for command buttons

    i need to know how to have simple arrays for control buttons,

    in vb6 when you copy and pasted it did it automatically, in vb.net it dosent and when i try to add () it dosent work...

    please help ...

    i need like

    cmdbut(1)
    cmdbut(2)
    ...
    cmdbut(100)

    etc
    Software languages known:
    Qbasic - TI-Basic - Liberty Basic - Visual Basic 6
    Software API's known:
    Directx 7 and 8
    Internet languages, in the process of learning:
    HTML - JAVASCRIPT - PHP - CSS - MYSQL - AJAX

  2. #2
    Frenzied Member HanneSThEGreaT's Avatar
    Join Date
    Nov 2003
    Location
    Vereeniging, South Africa
    Posts
    1,492

    Re: array for command buttons

    Control Arrays aren't part of VB.NET. You could create a Collection of buttons through code though.
    Just a note, to have more than one button share the same event handler ( as with VB 6 control arrays ), you could use the Handles clause
    VB.NET MVP 2008 - Present

  3. #3

    Thread Starter
    Fanatic Member damasterjo's Avatar
    Join Date
    Nov 2005
    Location
    In front of my Comp DirectX7 EXpert
    Posts
    827

    Re: array for command buttons

    that sounds pretty retarded! what happened to control arrays!?
    Software languages known:
    Qbasic - TI-Basic - Liberty Basic - Visual Basic 6
    Software API's known:
    Directx 7 and 8
    Internet languages, in the process of learning:
    HTML - JAVASCRIPT - PHP - CSS - MYSQL - AJAX

  4. #4
    Frenzied Member HanneSThEGreaT's Avatar
    Join Date
    Nov 2003
    Location
    Vereeniging, South Africa
    Posts
    1,492

    Re: array for command buttons

    Call it retarded or whatever you like, that is the way it is! Search this forum for "control array" and you'll get a lot of results.
    Search MSDN for "control collections", and you'll get a lot of examples on how to go about with it.
    Search google for vb.net "control arrays" and you'll also get a lot of results.
    stop salking, and good luck
    VB.NET MVP 2008 - Present

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