Hello
Is any body know how can I add/remove Item from menu at Runtime ?
Thank you for help
Printable View
Hello
Is any body know how can I add/remove Item from menu at Runtime ?
Thank you for help
Add them all at design time and set the Visible=False at run time.
Behind the scenes VB will actually remove the menu.
HTH,
Duncan
-------------------------------------------------
Ex. Datis: Duncan Jones
Merrion Computing Ltd
http://www.merrioncomputing.com
Make a control array of your menu item, ie., when creating a menu item, mnuItem, set its Index to 0. Then, during Runtime, you can Load mnuItem(1), Load mnuItem(2) and so on. Use Unload to remove them. If you need to remove menu items added during designtime, you need to make a series of calls to API functions GetMenu(), GetSubMenu(), and RemoveMenuItem().