This document is archived and information here might be outdated.  Recommended version.


IGraphicTracker.HitTest Method (ArcObjects .NET 10.4 SDK)
ArcObjects Library Reference (EngineCore)  

IGraphicTracker.HitTest Method

Returns the ID of the first graphic touched by the input window coordinates.

[Visual Basic .NET]
Public Function HitTest ( _
    ByVal x As Integer, _
    ByVal y As Integer _
) As Integer
[C#]
public int HitTest (
    int x,
    int y
);
[C++]
HRESULT HitTest(
  long x,
  long y,
  long* id
);
[C++]

Parameters x [in] x is a parameter of type long y [in] y is a parameter of type long id [out, retval] id is a parameter of type long

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Description

Returns the id of the graphic that was hit or -1 if no graphic was hit.

See Also

IGraphicTracker Interface