LinkLabel.PointInLink(Int32, Int32) Method

Definition

Gets the link located at the specified client coordinates.

C#
protected System.Windows.Forms.LinkLabel.Link PointInLink(int x, int y);
C#
protected System.Windows.Forms.LinkLabel.Link? PointInLink(int x, int y);

Parameters

x
Int32

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

y
Int32

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

Returns

A 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 LinkLabel control. You can use this method in an event handler for the 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 StatusBar text or a ToolTip.

Applies to

Product Versions
.NET Framework 1.1, 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

See also