property Chart.LinkFromPoint (X as OLE_XPOS_PIXELS, Y as OLE_YPOS_PIXELS) as Variant
Retrieves the link from the point.

TypeDescription
X as OLE_XPOS_PIXELS A single that specifies the current X location of the mouse pointer. The x values is always expressed in client coordinates.
Y as OLE_YPOS_PIXELS A single that specifies the current Y location of the mouse pointer. The y values is always expressed in client coordinates.
Variant A VARIANT expression that indicates the key of the link from the cursor, or empty if no link at cursor.
The LinkFromPoint property is used to retrieve the link associated with a specified point on the screen. When provided with X and Y coordinates, it returns the link at that location. If both the X parameter and the Y parameter are set to -1, the LinkFromPoint property instead determines and returns the key of the link located directly under the current position of the cursor, allowing for dynamic link identification based on cursor position. The LinksWidth property specifies the width, in pixels, of the pen used to draw the links between the bars. It also defines the sensitivity, which determines the size of the hit-test zone for the link essentially, how large the area is around the link that can be clicked by the user. Use the Link property to access properties of the link. Use the ItemFromPoint property to get the cell/item from the cursor. Use the ColumnFromPoint property to retrieve the column from cursor. Use the FormateDate property to format a date. Use the DrawDateTicker property to draw a ticker as cursor hovers the chart's area. Use the BarFromPoint property to get the bar from the point.

The following VB sample displays the key of the link from the cursor:

Private Sub G2antt1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    With G2antt1.Chart
        Debug.Print .LinkFromPoint(-1, -1)
    End With
End Sub