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


IActiveView.FocusMap Property (ArcObjects .NET 10.4 SDK)
ArcObjects Library Reference (Carto)  

IActiveView.FocusMap Property

The map that tools and controls act on.

[Visual Basic .NET]
Public Property FocusMap As IMap
[C#]
public IMap FocusMap {get; set;}
[C++]
HRESULT get_FocusMap(
  IMap** activeMap
);
[C++]
HRESULT putref_FocusMap(
  IMap* activeMap
);
[C++]

Parameters activeMap [out, retval]
activeMap is a parameter of type IMap activeMap [in]
activeMap is a parameter of type IMap

Product Availability

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

Remarks

A user's map may comprise one or more Map objects.  Each Map object typically holds layers of data as well as several MapSurround objects such as a Legend. This property returns an IMap reference to the Map object that currently has focus. In ArcMap, the focus map is the one visible in data view and the one selected in layout view.

Changing the focus map fires the IActiveViewEvents::FocusMapChanged event. In ArcMap, the focus map is automatically set to any new Map added.

IMxDocument::FocusMap is a read-only short cut to this property.

See Also

IActiveView Interface | IMxDocument.FocusMap Property

.NET Snippets

Get GeoFeatureLayer from Layer Index Number | Get All Features from Point Search in GeoFeatureLayer | Get MxApplication from ArcMap | Get Index Number from Layer Name | Do Identify | Get First Feature from Point Search in GeoFeatureLayer | Add Layer File to ActiveView | Create Graphic Buffers around Selected Features | Get Map from ArcMap | Add Shapefile Using OpenFileDialog | Get FeatureLayer from Layer Index Number | Add Hyperlink | Zoom to Layer by Index Number | Toggle Visibility Of Composite Layer

.NET Samples

Add a custom menu created in .NET to ArcGIS for Desktop (Code Files: AddShapefile) | Dynamic display animated zoom (Code Files: AnimatedZoomInTool AnimatedZoomOutTool)

.NET Related Topics

Adding a custom menu created in .NET to ArcGIS for Desktop | Create a custom tool | How to create a raster catalog layer | How to create a raster layer | How to create AOIs and bookmarks | How to create map grids | How to wire custom events using IActiveViewEvents | Performing basic map functions | Working with map surrounds | Working with PageLayout elements