.NET Framework Class Library
ContextMenu.Show Method (Control, Point, LeftRightAlignment)
Displays the shortcut menu at the specified position and with the specified alignment.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Syntax
Visual Basic
Public Sub Show ( _ control As Control, _ pos As Point, _ alignment As LeftRightAlignment _ )
C#
public void Show( Control control, Point pos, LeftRightAlignment alignment )
Visual C++
public: void Show( Control^ control, Point pos, LeftRightAlignment alignment )
F#
member Show : control:Control * pos:Point * alignment:LeftRightAlignment -> unit
Parameters
- control
- Type: System.Windows.Forms.Control
A Control that specifies the control with which this shortcut menu is associated.
- pos
- Type: System.Drawing.Point
A Point that specifies the coordinates at which to display the menu. These coordinates are specified relative to the client coordinates of the control specified in the control parameter.
- alignment
- Type: System.Windows.Forms.LeftRightAlignment
A LeftRightAlignment that specifies the alignment of the control relative to the pos parameter.
Version Information
.NET Framework
Supported in: 4, 3.5, 3.0, 2.0.NET Framework Client Profile
Supported in: 4, 3.5 SP1Platforms
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
See Also