Explained here: http://www.devbuzz.com/Archived/zinc_eVB_MenuBar_pg1.aspx
Hello RBarry Young,
Thanks, but i've resd this article of MSDN: http://msdn.microsoft.com/en-us/library/ms838303.aspx, but i've see that this component is from the Odyssey Inc., but when i try to acess the site i can't find this component for download.
I finally found and re-installed eVB. Here is the code to add menus taken stright from the help file. I tested it first. It works. First, add a CommandBar. The CommandBar and MenuBar have been combined into this tool.
Private Sub Form_Load() InitCommandBar End Sub Sub InitCommandBar() Dim mnuMain As CommandbarLib.CommandBarMenuBar Dim mnuFile As CommandbarLib.Item Dim mnuEdit As CommandbarLib.Item Set mnuMain = CommandBar1.Controls.Add(cbrMenuBar, "MainMenu") 'add File menu items Set mnuFile = mnuMain.Items.Add(1, "File", "File") mnuFile.SubItems.Add , "Open", "Open" mnuFile.SubItems.Add , "Add", "Add" mnuFile.SubItems.Add , "Update", "Update" mnuFile.SubItems.Add , "Delete", "Delete" 'add Edit menu items Set mnuEdit = mnuMain.Items.Add(2, "Edit", "Edit") mnuEdit.SubItems.Add , "Sort", "Sort" mnuEdit.SubItems.Add , "Find", "Find"
BTW - I did not find a menu editor.
Hello,
I've asked the same question in the DevBUZZ foruns, and i solved my problem, here is the link for more details: http://forums.devbuzz.com/How_To_Put_a_Menu_Bar_in_an_Aplication/m_41726/tm.htm
And here is the code to do this using a CommandBar:
Option Explicit
Private Sub Form_Load()
InitCommandBar
End Sub
Sub InitCommandBar()
Dim mnuMain As CommandbarLib.CommandBarMenuBar
Dim mnuFile As CommandbarLib.Item
Dim mnuEdit As CommandbarLib.Item
Set mnuMain = CommandBar1.Controls.Add(cbrMenuBar, "MainMenu")
'add File menu items
Set mnuFile = mnuMain.Items.Add(1, "File", "File")
mnuFile.SubItems.Add , "Open", "Open"
mnuFile.SubItems.Add , "Add", "Add"
mnuFile.SubItems.Add , "Update", "Update"
mnuFile.SubItems.Add , "Delete", "Delete"
'add Edit menu items
Set mnuEdit = mnuMain.Items.Add(2, "Edit", "Edit")
mnuEdit.SubItems.Add , "Sort", "Sort"
mnuEdit.SubItems.Add , "Find", "Find"
End Sub