ToolStrip.GetItemAt 方法
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
返回位于指定位置的项。
GetItemAt(Int32, Int32) |
返回位于 ToolStrip 工作区的指定 X 坐标和 Y 坐标的项。 |
GetItemAt(Point) |
返回位于 ToolStrip 的工作区中指定点的项。 |
- Source:
- ToolStrip.cs
- Source:
- ToolStrip.cs
- Source:
- ToolStrip.cs
返回位于 ToolStrip 工作区的指定 X 坐标和 Y 坐标的项。
public:
System::Windows::Forms::ToolStripItem ^ GetItemAt(int x, int y);
C#
public System.Windows.Forms.ToolStripItem GetItemAt(int x, int y);
C#
public System.Windows.Forms.ToolStripItem? GetItemAt(int x, int y);
member this.GetItemAt : int * int -> System.Windows.Forms.ToolStripItem
Public Function GetItemAt (x As Integer, y As Integer) As ToolStripItem
参数
- x
- Int32
从工作区左边缘开始算的水平坐标,以像素为单位。
- y
- Int32
从工作区上边缘开始算的垂直坐标,以像素为单位。
返回
指定位置处的 ToolStripItem,如果找不到 ToolStripItem,则为 null
。
适用于
.NET Framework 4.8.1 和其他版本
产品 | 版本 |
---|---|
.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, 10 |
- Source:
- ToolStrip.cs
- Source:
- ToolStrip.cs
- Source:
- ToolStrip.cs
返回位于 ToolStrip 的工作区中指定点的项。
public:
System::Windows::Forms::ToolStripItem ^ GetItemAt(System::Drawing::Point point);
C#
public System.Windows.Forms.ToolStripItem GetItemAt(System.Drawing.Point point);
C#
public System.Windows.Forms.ToolStripItem? GetItemAt(System.Drawing.Point point);
member this.GetItemAt : System.Drawing.Point -> System.Windows.Forms.ToolStripItem
Public Function GetItemAt (point As Point) As ToolStripItem
参数
- point
- Point
Point,在此处搜索 ToolStripItem。
返回
指定位置处的 ToolStripItem,如果找不到 ToolStripItem,则为 null
。
另请参阅
适用于
.NET Framework 4.8.1 和其他版本
产品 | 版本 |
---|---|
.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, 10 |