PointInLink Method

LinkLabel.PointInLink Method

Gets the link located at the specified client coordinates.

Namespace:  System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

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


Type: System.Int32
The horizontal coordinate of the point to search for a link.
Type: System.Int32
The vertical coordinate of the point to search for a link.

Return Value

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

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.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Community Additions

© 2016 Microsoft