With a MainMenu control on my form, I can loop thru the top level menu easy enough. Assuming my control is named mnuMain, I just use the following...
For i = 0 To (mnuMain.MenuItems.Count) - 1
' Do stuff with mnuMain.MenuItems.Item(i)
Next i
However, I can't figure out how to reference a menuitem's name since mnuMain.MenuItems.Item(i) has no Name property that appears via intellisense. But I know it has one since I assigned a name to each menuitem while in design mode. I can easily reference the Text property...
mnuMain.MenuItems.Item(i).Text
... and some other properties, but there's no .Name -- what am I missing?
For i = 0 To (mnuMain.MenuItems.Count) - 1
' Do stuff with mnuMain.MenuItems.Item(i)
Next i
However, I can't figure out how to reference a menuitem's name since mnuMain.MenuItems.Item(i) has no Name property that appears via intellisense. But I know it has one since I assigned a name to each menuitem while in design mode. I can easily reference the Text property...
mnuMain.MenuItems.Item(i).Text
... and some other properties, but there's no .Name -- what am I missing?