escheider
asked on
Creating VB Menus with code
Hello experts:
Id like to create a vb menu using code. The data elements would be pulled from a database table. I'm very comfortable with ado connectivity, just don't know how to create the menu.
Could anyone provide an example?
Thanks
E
Id like to create a vb menu using code. The data elements would be pulled from a database table. I'm very comfortable with ado connectivity, just don't know how to create the menu.
Could anyone provide an example?
Thanks
E
Alternatively you can done this also by using APIs:
http://www.allapi.net/apilist/apifunction.php?apifunction=CreatePopupMenu
http://www.allapi.net/apilist/apifunction.php?apifunction=CreatePopupMenu
ASKER
alfan:
So I have to create at least one entry using the Menu Editor in order to use code? And the initial entry I create should initiate the control array?
So lets say i want to create a menu called Reports. I create the Heading (Reports), then create the first entry under Reports?
So I have to create at least one entry using the Menu Editor in order to use code? And the initial entry I create should initiate the control array?
So lets say i want to create a menu called Reports. I create the Heading (Reports), then create the first entry under Reports?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
exactly.
(point goes to ryancys if it helps)
(point goes to ryancys if it helps)
ASKER
Works like a champ. I appreciate both of your help and have awarded ryancy's the points because alfanhendro said to do so.
Thanks
Escheider
Thanks
Escheider
Create the Menu as control array from the interface.
(one menu item is enough)
when you need to create a new one, just load it.
eg.
assuming the one created in the interface is has Index = 0
IndexCtr = IndexCtr + 1
Load mnuItem(IndexCtr)
mnuItem(IndexCtr).Visible = True