LabelArray and MenuItemArray
-
hi my name is rachel and I need help. I don't know how to use the controls:LabelArray and MenuItemArray :confused:
-
hi my name is rachel and I need help. I don't know how to use the controls:LabelArray and MenuItemArray :confused:
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
thenPublic 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