LinkLabel.PointInLink(Int32, Int32) 方法

定义

获取位于指定客户端坐标处的链接。

protected:
 System::Windows::Forms::LinkLabel::Link ^ PointInLink(int x, int y);
protected System.Windows.Forms.LinkLabel.Link PointInLink(int x, int y);
protected System.Windows.Forms.LinkLabel.Link? PointInLink(int x, int y);
member this.PointInLink : int * int -> System.Windows.Forms.LinkLabel.Link
Protected Function PointInLink (x As Integer, y As Integer) As LinkLabel.Link

参数

x
Int32

要搜索链接的点的水平坐标。

y
Int32

要搜索链接的点的垂直坐标。

返回

一个 LinkLabel.Link 表示位于指定坐标处的链接。 如果点不包含链接, null 则返回。

注解

使用此方法可以确定链接是否位于控件中的 LinkLabel 特定点。 可以在控件事件的事件处理程序 MouseEnter 中使用此方法来确定鼠标指针是否悬停在控件中的链接上。 确定鼠标指针位于链接上后,即可通过 StatusBar 文本或文本显示 ToolTip指向用户的链接的其他信息。

适用于

另请参阅