Skip to content

Files

Latest commit

 

History

History
 
 

ToolbarControlMDIApplication

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

ToolbarControl MDI application

This sample demonstrates creating a Multiple Document Interface (MDI) application using the ToolbarControl, MapControl, and the control commands.
Language:              C#, VB
Subject:               Controls
Organization:          Esri, http://www.esri.com
Date:                  10/17/2019
ArcObjects SDK:        10.8
Visual Studio:         2017, 2019
.NET Target Framework: 4.5

Resources

Usage

  1. Click File and click New to create a document window containing a MapControl, then click Close to exit the currently selected document window.
  2. Click Window and click Cascade, Tile Horizontally, or Tile Vertically to arrange the document windows in the application.
  3. Use the commands and tools on the ToolbarControl to load a map document and navigate around the data in the currently selected document window.
  4. Click a document window to select it or select it from the Window menu.
  5. Click Exit under the File menu to close the application.

Additional information

The "parent" form containing the ToolbarControl has the IsMdiContainer property set to true for it to support "child" document windows. The parent form also contains a MainMenu component with a File menu for creating and closing child document windows, and a Windows menu for arranging the child document windows.
 
The child form contains a MapControl. When a document is loaded into the MapControl, the child form's caption is set to the IMapControl3.DocumentFileName property in the OnMapReplaced event. This caption is used by the Windows menu on the parent form to show a list of all the child document windows that are currently open.
 
For the commands and tools on the ToolbarControl to work with multiple MapControls in the child document windows, the SetBuddyControl method is used within the parent form's MdiChildActivate event to set the ToolbarControl buddy to the MapControl in the active child form.

See Also

ToolbarControl Class
IToolbarControl Interface


Licensing

Development licensing Deployment licensing
Engine Developer Kit Engine
ArcGIS Desktop Basic
ArcGIS Desktop Standard
ArcGIS Desktop Advanced