System.Windows.Forms.LinkLabel.PointInLink Method

Gets the link located at the specified client coordinates.

Syntax

protected LinkLabel.Link PointInLink (int x, int y)

Parameters

x
The horizontal coordinate of the point to search for a link.
y
The vertical coordinate of the point to search for a link.

Returns

A System.Windows.Forms.LinkLabel.Link representing the link located at the specified coordinates. If the point does not contain a link, null is returned.

Remarks

This method enables you to determine whether a link is located at a specific point within a System.Windows.Forms.LinkLabel control. You can use this method in an event handler for the Control.MouseEnter event of the control to determine whether the mouse pointer is hovering over a link in the control. Once you have determined that the mouse pointer is over a link, you can then display additional information about the link to the user through System.Windows.Forms.StatusBar text or a System.Windows.Forms.ToolTip.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0