property SwimLane.HitTestFromPoint (X as OLE_XPOS_PIXELS, Y as OLE_YPOS_PIXELS) as HitTest
Gets the Element object and the Hit-Test code from the cursor.

TypeDescription
X as OLE_XPOS_PIXELS A Long expression that specifies the x-cursor position.
Y as OLE_YPOS_PIXELS A Long expression that specifies the y-cursor position.
HitTest A HitTest object that holds information about the Element from the specified position. 
The HitTestFromPoint property returns the element/hit-test code from the specified position. The HitTestFromPoint(-1,-1) property returns the element/hit-test code from the current cursor position. The ElementFromPoint property returns the element from the cursor. For instance, you can use the HitTestFromPoint property to determine whether the cursor hovers the expand/collapse glyphs, the element's checkbox, picture and so on.

The following VB sample determines if the cursor hovers the element's expand/collapse glyphs:

Private Sub SwimLane1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    Dim h As HitTest
    Set h = SwimLane1.HitTestFromPoint(-1, -1)
    If Not h Is Nothing Then
        If (h.HitTestCode And exHitTestMask) = exHitTestGlyph Then
            Debug.Print "Expand/Collase Glyph of " & h.Element.ID
        End If
    End If
End Sub