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


IApplication Interface (ArcObjects .NET 10.4 SDK)
ArcObjects Library Reference (Framework)  

IApplication Interface

Provides access to members that query or modify the application.

Product Availability

Available with ArcGIS Desktop.

Description

The Application object is the core object in the ArcMap and ArcCatalog applications. This object represents the application itself and acts as the central point where access is gained to other objects in the system. The Application object's primary interface is IApplication. This interface provides access to the Document object, the extensions, the StatusBar object, the Templates object, the currently selected tool, and the Visual Basic Editor. There are several methods that allow you to open, save, and print documents, lock and unlock the application from user customizations, display dialogs, and exit the application.


Members

Description
Read/write property Caption The caption of this application.
Read/write property CurrentTool The currently selected tool.
Read-only property Document The document that is currently loaded in the application.
Method FindExtensionByCLSID Finds an extension by its CLSID.
Method FindExtensionByName Finds an extension by its name.
Read-only property hWnd The handle of the application's window.
Method IsDialogVisible Indicates if the specified dialog is visible in the application.
Method LockCustomization Locks the application's user interface against any customizations.
Read-only property Name The name of this application.
Method NewDocument Creates a new document in this application.
Method OpenDocument Opens a document in this application.
Method PrintDocument Displays the Print dialog.
Method PrintPreview Displays how the document will look like when it is printed.
Method RefreshWindow Redraws the application window.
Method SaveAsDocument Saves the document that is currently open in this application to a different file.
Method SaveDocument Saves the document that is currently open in this application.
Method ShowDialog Displays the specified dialog in the application.
Method Shutdown Terminates the application.
Read-only property StatusBar The statusbar of this application.
Read-only property Templates The templates collection.
Method UnlockCustomization Unlocks previous user interface customization lock.
Read-only property VBE The Visual Basic Environment.
Read/write property Visible Indicates if the application window is visible.

CoClasses that implement IApplication

CoClasses and Classes Description
Application (esriArcCatalog) Esri ArcCatalog Application.
Application (esriArcGlobe) Esri ArcGlobe Application.
Application (esriArcMap) Esri ArcMap Application
Application (esriArcScene) The 3D Modeling Application.
AppRef A reference to the currently running application.

See Also

IMxApplication Interface | IDocument.Parent Property | ICommand.OnCreate Method

.NET Snippets

Open StyleReferencesDialog | Get Command by Name | Show Progress Dialog | Open StyleManagerDialog | List ArcMap Visible Toolbars | Display Extension State on Status Bar | Display Template Information in MessageBox | Get Extension | Move Application Window to Center | Get Network Analyst Extension | Use Custom Tool on Windows Form | Get PageLayout from ArcMap | Get MxApplication from ArcMap | Get Dockable Window | Create Context Menu | Get hWnd from ArcGIS Desktop | Find Command and Execute | Get Globe from Application | TimeControl Playback | Set Tool Active in ToolBar | Minimize Application Window | Statements - Use a Tool in a Windows Form | Get MxDocument from ArcMap | Get Document Path | Get ActiveView from ArcMap | Get Command on Toolbar by Names | Get Editor from ArcMap | Animation Progressor | Statements - Get Network Analyst Extension | Open GxDialog | Get Map from ArcMap | Open MxDialog | Statements - Get hWnd from ArcGIS Desktop | Flip Line Direction | Get Contents View from ArcMap | Get Toolbar by Name | Assign Shortcut Key to Command

.NET Samples

Export any network analysis class to a text file (Code Files: NAClassToTextfileCmd) | Convert part to feature command (Code Files: ConvertPart) | Add a custom menu created in .NET to ArcGIS for Desktop (Code Files: AddShapefile) | Extension implementation (Code Files: ArcEditorOnlyExtension ArcInfoOnlyExtension ArcViewOnlyExtension SimpleExtension) | Layer property page and property sheet (Code Files: SimpleLayerPropertiesCmd) | Points along line construction tool (Code Files: PointsAlongLineTool) | ViperPin tool (Code Files: ViperPinTool) | Selection restriction evaluator (Code Files: SelectionRestrictionEvaluator) | Recently used files�Command, MultiItem, and ComboBox (Code Files: CommandRecentFiles RecentFilesCombo RecentFilesRegistryHelper) | Automate ArcGIS for Desktop applications (Code Files: Form1) | Implementing a schematic digitizing tool (Code Files: DigitTool DockableDigit) | Layer filtering TOC view (Code Files: TOCLayerFilter) | Angle Angle shape constructor (Code Files: AngleAngleCmd) | Move a graphic along a path in ArcMap (Code Files: cmdMoveGraphicAlongPath) | ArcGIS Network Analyst extension barrier location editor (Code Files: EditorForm NABarrierLocationEditor) | Subset network evaluators (Code Files: AddSubsetAttributesCommand AutoUpdateNetworkElementArrayParametersCommand RemoveSubsetAttributesCommand SubsetHelperUI) | Custom subtyped command and tool (Code Files: PolyFeedbackTools ZoomInCommands) | StreetMap routing (Code Files: RoutingForm) | Create a command by inheriting from BaseCommand (Code Files: ZoomToLayer) | Create a custom tool (Code Files: DrawGraphicLine) | Applying user interface customizations at startup (Code Files: AcmeExt) | Create a custom selection extension by extending ArcObjects (Code Files: SelectByLineTool SelectionCountDockWin SelectionExtension SelectionTargetComboBox SelectionToolPalette ToggleDockWinBtn ZoomToLayerMultiItem) | Schematic diagram auto refresh (Code Files: Autorefresh FormAutorefresh) | Simple logging dockable window with a custom context menu (Code Files: ClearLoggingCommand LoggingDockableWindow LoggingDockableWindowCommand LogLineMultiItemCmd) | Custom feedback tool and font drop-down list tool control (Code Files: FontToolControl ToolSample) | Web browser dockable window (Code Files: ESRIWebsitesWindow ESRIWebsitesWindowCommand) | Migrating from VB6 to VB .NET for ArcGIS 10 (Code Files: clscopy_table_sel clsCopyTableSelection) | Extension to listen to document open and save events (Code Files: LogExtension) | Tabbed feature inspector (Code Files: AddEXTCLSID)

.NET Related Topics

Accessing application and document objects | Animation | ArcMapUI | Automating ArcGIS for Desktop applications | Building a context menu with dynamic command items | CatalogUI | Create a command by inheriting from BaseCommand | Create a custom tool | Editor framework customizations | GlobeCore | How to create AOIs and bookmarks | How to create multiple commands or tools in a single class subtyped command | How to find an extension | How to listen to document events | How to load data into a network analysis problem | How to pass the ArcGIS for Desktop application from a command or tool | How to use symbol level drawing | How to wire custom events using IActiveViewEvents | Interacting with singleton objects | LocationUI | Migrating VB6 to VB.NET for ArcGIS 10 | NetworkAnalystUI | Performing basic map functions | Publisher | Writing .NET code using properties