System.Windows.Forms.AccessibleObject.HitTest Method

Retrieves the child object at the specified screen coordinates.

Syntax

public virtual AccessibleObject HitTest (int x, int y)

Parameters

x
The horizontal screen coordinate.
y
The vertical screen coordinate.

Returns

An System.Windows.Forms.AccessibleObject that represents the child object at the given screen coordinates. This method returns the calling object if the object itself is at the location specified. Returns null if no object is at the tested location.

Remarks

For nonrectangular objects such as list view items, the coordinates of the object's bounding rectangle retrieved by AccessibleObject.Bounds can fail if tested with AccessibleObject.HitTest(int, int), because AccessibleObject.HitTest(int, int) determines the object's boundaries on a pixel-by-pixel basis.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0