Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Want to crate a Collection Of Control

Want to crate a Collection Of Control

Scheduled Pinned Locked Moved Visual Basic
tutorial
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    hisuman100
    wrote on last edited by
    #1

    how to add a windows control(e.g. Button Control) to a collection Suman

    R 1 Reply Last reply
    0
    • H hisuman100

      how to add a windows control(e.g. Button Control) to a collection Suman

      R Offline
      R Offline
      Robert Rohde
      wrote on last edited by
      #2

      What kind of collection do you mean?

      ArrayList list = new ArrayList();
      list.Add(button);

      H 1 Reply Last reply
      0
      • R Robert Rohde

        What kind of collection do you mean?

        ArrayList list = new ArrayList();
        list.Add(button);

        H Offline
        H Offline
        hisuman100
        wrote on last edited by
        #3

        'Declaring Collection Dim mycol as collection 'If I have two button control button1 & button2, Then I want to add this two button to the collection so that I can control them using "For each button in mycol " command Thank you Suman

        R 1 Reply Last reply
        0
        • H hisuman100

          'Declaring Collection Dim mycol as collection 'If I have two button control button1 & button2, Then I want to add this two button to the collection so that I can control them using "For each button in mycol " command Thank you Suman

          R Offline
          R Offline
          Robert Rohde
          wrote on last edited by
          #4

          Dim coll As Collection
          coll = New Collection
          coll.Add(Button1)
          coll.Add(Button2)
          Dim b As Button
          For Each b In coll
          b.Text = "Got you!!!"
          Next

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups