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

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

.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