ContextMenu.Show Method (Control, Point, LeftRightAlignment)

 

Displays the shortcut menu at the specified position and with the specified alignment.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public void Show(
	Control control,
	Point pos,
	LeftRightAlignment alignment
)

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.

.NET Framework
Available since 2.0
Return to top
Show: