DataGridView::DataGridViewAccessibleObject::HitTest Method (Int32, Int32)

 

Retrieves the child object at the specified screen coordinates.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public:
virtual AccessibleObject^ HitTest(
	int x,
	int y
) override

Parameters

x
Type: System::Int32

The horizontal screen coordinate.

y
Type: System::Int32

The vertical screen coordinate.

Return Value

Type: System.Windows.Forms::AccessibleObject^

An AccessibleObject that represents an object at the given screen coordinates, or null if no object is at the specified location.

The HitTest method returns an AccessibleObject that represents part of the DataGridView. If the object itself is at the specified location, this method returns the calling object. The following table describes what the AccessibleObject represents.

Area clicked

Object represented by accessible object

Column header cell

DataGridViewColumnHeaderCell

Row header cell

DataGridViewRow

Cell

DataGridViewCell

Scroll bar

AccessibleObject

.NET Framework
Available since 2.0
Return to top
Show: