udipr
March 21st, 2001, 06:32 AM
Hello
Is any body know how can I add/remove Item from menu at Runtime ?
Thank you for help
Is any body know how can I add/remove Item from menu at Runtime ?
Thank you for help
|
Click to See Complete Forum and Search --> : Menu Items at RunTime udipr March 21st, 2001, 06:32 AM Hello Is any body know how can I add/remove Item from menu at Runtime ? Thank you for help Clearcode March 21st, 2001, 06:49 AM 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 shree March 21st, 2001, 06:52 AM 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(). codeguru.com
Copyright Internet.com Inc., All Rights Reserved. |