StatusBar.HitTest

Syntax

StatusBar.HitTest( x, y)

Return Value

Long

Returns a zero-based item index. You can use this value to retrieve a StatusBarPane object from the StatusBarPanes collection. This method returns -1 when the location is not on a pane.

Purpose

Returns the index of the pane at the given coordinates.

Remarks

Use this method to determine the item to which the given coordinates belong. For example, when a user clicks on the control, you might want to determine the item the user clicked.

Parameters

x As Long

[In] Specifies the x-coordinate of the location to test, in pixels, relative to the control.

y As Long

[In] Specifies the y-coordinate of the location to test, in pixels, relative to the control.

See Also

StatusBar.Panes

StatusBarPane

StatusBarPanes