Επεξεργασία

Κοινή χρήση μέσω


IMenuCommandService.ShowContextMenu(CommandID, Int32, Int32) Method

Definition

Shows the specified shortcut menu at the specified location.

public:
 void ShowContextMenu(System::ComponentModel::Design::CommandID ^ menuID, int x, int y);
public void ShowContextMenu (System.ComponentModel.Design.CommandID menuID, int x, int y);
abstract member ShowContextMenu : System.ComponentModel.Design.CommandID * int * int -> unit
Public Sub ShowContextMenu (menuID As CommandID, x As Integer, y As Integer)

Parameters

menuID
CommandID

The CommandID for the shortcut menu to show.

x
Int32

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

y
Int32

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

Remarks

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.

Applies to

See also