Imports System.IO
Imports System.Runtime.InteropServices
Module Example
    <STAThread()> _
    Sub Main()
        Dim objApplication As SolidEdgeFramework.Application = Nothing
        Dim currentCommandBarMode As Object = Nothing
        Try
            OleMessageFilter.Register()
            ' Start Solid Edge
            objApplication = Marshal.GetActiveObject("SolidEdge.Application")
            ' Determine the current command user interface mode.
            objApplication.GetGlobalParameter(SolidEdgeFramework.ApplicationGlobalConstants.seApplicationGlobalCommandBarMode, currentCommandBarMode)
            Select Case currentCommandBarMode
                Case SolidEdgeConstants.SECommandBarModeConstants.seApplicationGlobalShowCommandBarMode
                    ' CommandBarMode = seApplicationGlobalShowCommandBarMode
                Case SolidEdgeConstants.SECommandBarModeConstants.seApplicationGlobalShowQuickBarMode
                    ' CommandBarMode = seApplicationGlobalShowQuickBarMode
            End Select
            ' Set the command user interface mode to Command Bar Mode.
            objApplication.SetGlobalParameter( _
                SolidEdgeFramework.ApplicationGlobalConstants.seApplicationGlobalCommandBarMode, _
                SolidEdgeConstants.SECommandBarModeConstants.seApplicationGlobalShowCommandBarMode)
            ' Set the command user interface mode to Quick Bar Mode.
            objApplication.SetGlobalParameter( _
                SolidEdgeFramework.ApplicationGlobalConstants.seApplicationGlobalCommandBarMode, _
                SolidEdgeConstants.SECommandBarModeConstants.seApplicationGlobalShowQuickBarMode)
        Catch ex As Exception
            Console.WriteLine(ex.Message)
        Finally
            OleMessageFilter.Revoke()
        End Try
    End Sub
End Module