IMenuCommandService::ShowContextMenu Method (CommandID^, Int32, Int32)

 

Shows the specified shortcut menu at the specified location.

Namespace:   System.ComponentModel.Design
Assembly:  System (in System.dll)

void ShowContextMenu(
	CommandID^ menuID,
	int x,
	int y
)

Parameters

menuID
Type: System.ComponentModel.Design::CommandID^

The CommandID for the shortcut menu to show.

x
Type: System::Int32

The x-coordinate at which to display the menu, in screen coordinates.

y
Type: System::Int32

The y-coordinate at which to display the menu, in screen coordinates.

The ShowContextMenu method can display any of the following Visual Studio shortcut menus containing menu commands at a specified point:

Menu

CommandID

The shortcut menu displayed for a container

ContainerMenu

The shortcut menu displayed for the component tray

ComponentTrayMenu

The shortcut menu displayed for a selection

SelectionMenu

The shortcut menu displayed for a tray selection

TraySelectionMenu

This method can also display other registered shortcut menus.

.NET Framework
Available since 1.1
Return to top
Show: