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. LabelArray and MenuItemArray

LabelArray and MenuItemArray

Scheduled Pinned Locked Moved Visual Basic
helptutorial
2 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.
  • I Offline
    I Offline
    Ilan Ehrenfeld
    wrote on last edited by
    #1

    hi my name is rachel and I need help. I don't know how to use the controls:LabelArray and MenuItemArray :confused:

    N 1 Reply Last reply
    0
    • I Ilan Ehrenfeld

      hi my name is rachel and I need help. I don't know how to use the controls:LabelArray and MenuItemArray :confused:

      N Offline
      N Offline
      Nick Seng
      wrote on last edited by
      #2

      Both these object are from the vb6.compatibility namespace and are used to represent control array when upgrading a project from vb6 to .net. Microsoft does not recommend the use of these objects for new .net projects sinse they will not support it in later versions. However, if you still want to use them... First add the controls to the form, say lblArray,lbl_0,lbl_1,lbl_2 then Public Sub Form_Load() lblArray.SetIndex(lbl_0,Ctype(0,Short) lblArray.SetIndex(lbl_1,Ctype(1,Short) lblArray.SetIndex(lbl_2,Ctype(2,Short) End Sub You can then reference these controls as lblArray(i), where i = 0,1,2 though IMHO, it's better than you not use them. Instead just declare an array of labels and assign each control to it Notorious SMC


      The difference between the almost-right word & the right word is a really large matter - it's the difference between the lightning bug and the Lightning Mark Twain
      Get your facts first, and then you can distort them as much as you please Mark Twain

      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