|
-
March 21st, 2001, 07:32 AM
#1
Menu Items at RunTime
Hello
Is any body know how can I add/remove Item from menu at Runtime ?
Thank you for help
-
March 21st, 2001, 07:49 AM
#2
Re: Menu Items at RunTime
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
-
March 21st, 2001, 07:52 AM
#3
Re: Menu Items at RunTime
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().
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|