Skip to content

HitTest Method

Description

The HitTest method returns -1 if the tested point is within the list box but not on an item in the list box. If the tested point is on an item in the list box, HitTest returns the index of the list box item.

Syntax

Public Function HitTest( _
    ByVal x As Single, _
    ByVal y As Single _
) As Integer

Parameters

  • x: x coordinate to test.
  • y: y coordinate to test.

Return Type

  • Integer: See Remarks.

Remarks

The HitTest method returns -1 if the tested point is within the list box but not on an item in the list box. If the tested point is on an item in the list box, HitTest returns the index of the list box item.

See Also


Copyright (c) 1998-2024 Codejock Technologies. All rights reserved.