Share via


IVsMenuEditor.SelectionChange Method

Called whenever the selection changes. If pIMI is NULL, no menu item is selected. If it is non nulla null reference (Nothing in Visual Basic), it points to the item to be selected. Only one item can be selected at a time from outside MenuDesigner. This method does not set focus to the item; see the SetFocus method below for that behavior.

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)

Syntax

'Declaration
Function SelectionChange ( _
    pIMI As IntPtr _
) As Integer
int SelectionChange(
    IntPtr pIMI
)
int SelectionChange(
    [InAttribute] IntPtr pIMI
)
abstract SelectionChange : 
        pIMI:IntPtr -> int 
function SelectionChange(
    pIMI : IntPtr
) : int

Parameters

Return Value

Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

C++

From vsshell.idl:

HRESULT IVsMenuEditor::SelectionChange([in]IVsMenuItem *pIMI);

.NET Framework Security

See Also

Reference

IVsMenuEditor Interface

Microsoft.VisualStudio.Shell.Interop Namespace