Command Bars ActiveX works fine when IsMDiContainer property of main form is set to False; however, the menu does not display if set to True.
I created a simple test Windows Application project using Visual Studio 2005 RC, and then added a COM reference to Xtreme CommandBars ActiveX Control 9.60.
Test form load looks like this...
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim m_menuBar As XtremeCommandBars.CommandBar m_menuBar = Me.CommandBarsMgr.ActiveMenuBar
Dim Control As XtremeCommandBars.CommandBarControl 'turn off expand arrow (right arrow on tool bar) Me.CommandBarsMgr.Options.ShowExpandButtonAlways = False m_menuBar.Closeable = False
Dim FileMenu As XtremeCommandBars.CommandBarControl FileMenu = m_menuBar.Controls.Add(XtremeCommandBars.XTPControlType.xtpC ontrolPopup, 0, "&File") FileMenu.Id = 2100
With FileMenu.CommandBar.Controls 'UPGRADE_WARNING: Couldn't resolve default property of object FileMenu.CommandBar. Click for more: 'ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?keywor d="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' .Add(XtremeCommandBars.XTPControlType.xtpControlButton, 2101, "&New Client File") 'UPGRADE_WARNING: Couldn't resolve default property of object FileMenu.CommandBar. Click for more: 'ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?keywor d="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' .Add(XtremeCommandBars.XTPControlType.xtpControlButton, 2102, "&Open Client File...") 'UPGRADE_WARNING: Couldn't resolve default property of object FileMenu.CommandBar. Click for more: 'ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?keywor d="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' .Add(XtremeCommandBars.XTPControlType.xtpControlButton, 2103, "&Save Client File") 'UPGRADE_WARNING: Couldn't resolve default property of object FileMenu.CommandBar. Click for more: 'ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?keywor d="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' .Add(XtremeCommandBars.XTPControlType.xtpControlButton, 2104, "Save Client File &As...") End With
Me.CommandBarsMgr.ActiveMenuBar.Visible = True
End Sub
|