Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Add Menu items at runtime?
Message
General information
Forum:
Visual Basic
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00404608
Message ID:
00404860
Views:
10
>>>How can I add menu items at runtime?
>>>
>>>(I'd like to load items to the menu from a table.)
>>
>>Look at [Creating and Modifying Menus at Run Time] in the VB help.
>
>I have seen how to create a control array in the menu editor. But I do not see how to create or extend this array in code.

In this topic, they talk about creating a control array with a menu element. Then in your code, you must do something like:
Private Sub Command1_Click()
    Load mnuItem(1)
    mnuItem(1).Caption = "Item 2"
End Sub
I have a small question for you: How will you call action related to your selected item?
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform