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


IMxDocument.CurrentLocation Property (ArcObjects .NET 10.4 SDK)
ArcObjects Library Reference (ArcMapUI)  

IMxDocument.CurrentLocation Property

The current mouse location in map units.

[Visual Basic .NET]
Public Property CurrentLocation As IPoint
[C#]
public IPoint CurrentLocation {get; set;}

Product Availability

Available with ArcGIS Desktop.

Remarks

A lot of tools require the current mouse location in order to perform an operation.  This property provides a short-cut alternative to having to manually calculate the current mouse location in map units.  For example, a typical pan tool needs the current mouse location in three different places: when the mouse if first clicked, while the mouse drags, and when the button is released.  Although ITool provides the mouse location for each of these events, the location is given in x,y device units.  Rather than writing a function that uses something like IDisplayTransformation::ToMapPoint to calculate the location in map units, the Location property does this automatically behind the scenes.

See Also

IMxDocument Interface