Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
Shows the shortcut menu with the given command ID at the given location.
Namespace: Microsoft.VisualStudio.Shell
Assemblies: Microsoft.VisualStudio.Shell.9.0 (in Microsoft.VisualStudio.Shell.9.0.dll)
Microsoft.VisualStudio.Shell (in Microsoft.VisualStudio.Shell.dll)
Microsoft.VisualStudio.Shell.10.0 (in Microsoft.VisualStudio.Shell.10.0.dll)
Syntax
'Declaration
Public Overrides Sub ShowContextMenu ( _
menuID As CommandID, _
x As Integer, _
y As Integer _
)
'Usage
Dim instance As OleMenuCommandService
Dim menuID As CommandID
Dim x As Integer
Dim y As Integer
instance.ShowContextMenu(menuID, x, y)
public override void ShowContextMenu(
CommandID menuID,
int x,
int y
)
public:
virtual void ShowContextMenu(
CommandID^ menuID,
int x,
int y
) override
abstract ShowContextMenu :
menuID:CommandID *
x:int *
y:int -> unit
override ShowContextMenu :
menuID:CommandID *
x:int *
y:int -> unit
public override function ShowContextMenu(
menuID : CommandID,
x : int,
y : int
)
Parameters
- menuID
Type: System.ComponentModel.Design.CommandID
A command ID representing the shortcut menu to show.
- x
Type: System.Int32
The horizontal position, in screen coordinates, of the top, left corner of the shortcut menu. If the shortcut menu does not fit on the screen, the operating system relocates it to fit.
- y
Type: System.Int32
The vertical position, in screen coordinates, of the top, left corner of the shortcut menu. If the shortcut menu does not fit on the screen, the operating system relocates it to fit.
Implements
IMenuCommandService.ShowContextMenu(CommandID, Int32, Int32)
Exceptions
| Exception | Condition |
|---|---|
| ArgumentNullException | menuID is null. |
Remarks
The ShowContextMenu method shows a shortcut menu that has been tagged with the given command ID at the given location. A shortcut menu is always tagged with a command ID that defines it. Coordinates are global to the screen.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.