Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - VB.NET upgrade of VB6 application
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

VB.NET upgrade of VB6 application

 Post Reply Post Reply
Author
Message
olofh View Drop Down
Newbie
Newbie


Joined: 04 October 2005
Location: United States
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote olofh Quote  Post ReplyReply Direct Link To This Post Topic: VB.NET upgrade of VB6 application
    Posted: 04 October 2005 at 10:44am

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

 

 

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 05 October 2005 at 1:09am

Add this

Dim ctrl As Control
For Each ctrl In Controls
If (ctrl.GetType Is GetType(System.Windows.Forms.MdiClient)) Then
           CommandBars.SetMDIClient(ctrl.Handle.ToInt32)
End

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.156 seconds.