Demo for Developer Day

Coordinator
Jun 10, 2012 at 8:57 PM

You can do code in these forums

Friend Class Command

    Implements IDisposable

    Dim m_Command As SolidEdgeFramework.Command
    Dim m_Mouse As SolidEdgeFramework.Mouse

    Dim m_CommandWindowEvents As SolidEdgeFramework.ISECommandWindowEvents_Event

    Dim m_CommandEvents As SolidEdgeFramework.ISECommandEvents_Event

    Dim m_MouseEvents As SolidEdgeFramework.ISEMouseEvents_Event

    Dim m_ResourceHandle As Int32

    Public Sub CreateCommand(ByVal TheApp As SolidEdgeFramework.Application)
        If Not TheApp Is Nothing Then

            m_Command = TheApp.CreateCommand(SolidEdgeConstants.seCmdFlag.seNoDeactivate)

            If Not m_Command Is Nothing Then
                ' Get the command events object so I can react to Activate, Terminate etc.
                m_CommandEvents = m_Command
                ' Get the command window events. Notifications from the ribbon bar dialog come
                ' in via the windowproc event (as do lots and lots of other window messages)
                m_CommandWindowEvents = m_Command.Window
                ' Get the mouse events so I can respond to MouseClick. Note the Mouse will not
                ' be ready for filter calls until the command is activated so I set that up in
                ' the Activate event.
                m_Mouse = m_Command.Mouse

                m_MouseEvents = m_Mouse

                AddOrRemoveEventHandlers(True)
            End If
        End If
    End Sub

!

Better than just text.