views:

453

answers:

1

Friends, Tell me how to generate more than 1 levels of sub-menu in VB6 at runtime? Explain in brief? Any specific controls are there? But i dont want to use external controls!

+2  A: 

You can do this with standard VB-menus, but since you'll have to use control arrays, you have to create a first prototype menu with Index = 0 (e.g. mnuFoo(0)) at design time (usually invisible). You can now load new items dynamically.

Call Me.Load(mnuFoo(1)) ' New array member (index 1) '
With mnuFoo(1)
    .Visible = True ' Make it visible
    ' --- Do some settings
End With
Dario
I need more than one level of menu.ie., a submenu and its submenu. Complete code fragment needed!
Srinivasan__
Ehm, just create your prototype menu as a submenu!
Dario