ToolStrip.GetItemAt Method

Definition

Returns the item located at the specified location.

Overloads

GetItemAt(Int32, Int32)

Returns the item located at the specified x- and y-coordinates of the ToolStrip client area.

GetItemAt(Point)

Returns the item located at the specified point in the client area of the ToolStrip.

GetItemAt(Int32, Int32)

Source:
ToolStrip.cs
Source:
ToolStrip.cs
Source:
ToolStrip.cs

Returns the item located at the specified x- and y-coordinates of the ToolStrip client area.

public System.Windows.Forms.ToolStripItem GetItemAt (int x, int y);
public System.Windows.Forms.ToolStripItem? GetItemAt (int x, int y);

Parameters

x
Int32

The horizontal coordinate, in pixels, from the left edge of the client area.

y
Int32

The vertical coordinate, in pixels, from the top edge of the client area.

Returns

The ToolStripItem located at the specified location, or null if the ToolStripItem is not found.

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

GetItemAt(Point)

Source:
ToolStrip.cs
Source:
ToolStrip.cs
Source:
ToolStrip.cs

Returns the item located at the specified point in the client area of the ToolStrip.

public System.Windows.Forms.ToolStripItem GetItemAt (System.Drawing.Point point);
public System.Windows.Forms.ToolStripItem? GetItemAt (System.Drawing.Point point);

Parameters

point
Point

The Point at which to search for the ToolStripItem.

Returns

The ToolStripItem at the specified location, or null if the ToolStripItem is not found.

See also

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9