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. creating checkboxes dynamically

creating checkboxes dynamically

Scheduled Pinned Locked Moved Visual Basic
helpquestion
4 Posts 3 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.
  • G Offline
    G Offline
    gamerPotatoe
    wrote on last edited by
    #1

    HI guys I'm working in VB6 and I need some help in creating a user control instance in code. I need to create lets say an X number of checkboxes and arrange them within a form. How do I create them dynaically in code to start with. Ay comments would be greatly appreciated :D

    D 1 Reply Last reply
    0
    • G gamerPotatoe

      HI guys I'm working in VB6 and I need some help in creating a user control instance in code. I need to create lets say an X number of checkboxes and arrange them within a form. How do I create them dynaically in code to start with. Ay comments would be greatly appreciated :D

      D Offline
      D Offline
      Dr_X
      wrote on last edited by
      #2

      It has been a while but I think it is something like this.

      dim chkbox as new checkbox

      me.controls.add(chkbox)
      'or possibly
      dim o as object
      set o = me.controls.add(chkbox)

      Michael

      Z 2 Replies Last reply
      0
      • D Dr_X

        It has been a while but I think it is something like this.

        dim chkbox as new checkbox

        me.controls.add(chkbox)
        'or possibly
        dim o as object
        set o = me.controls.add(chkbox)

        Michael

        Z Offline
        Z Offline
        zaheer Asif
        wrote on last edited by
        #3

        note it is for vb6.0 dim chkbox as checkbox set chkbox=controls.add("vb.checkbox","checkbox1") chkbox.visible=true chkbox.left=50 chkbox.height=50 chkbox.enabled=true u can also change name (the second parameter in controls.add method) by concating string

        1 Reply Last reply
        0
        • D Dr_X

          It has been a while but I think it is something like this.

          dim chkbox as new checkbox

          me.controls.add(chkbox)
          'or possibly
          dim o as object
          set o = me.controls.add(chkbox)

          Michael

          Z Offline
          Z Offline
          zaheer Asif
          wrote on last edited by
          #4

          note it is for vb6.0 dim chkbox as checkbox set chkbox=controls.add("vb.checkbox","checkbox1") chkbox.visible=true chkbox.left=50 chkbox.height=50 chkbox.enabled=true Note:- u can also change name (the second parameter in controls.add method) by concating string

          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