How to use
See How to use ArcGIS samples for help on compiling, setting up the debugger, and running the sample. If the sample has associated data, you will find that the sample's zip file includes a "data" folder alongside the language folders. However, you will need to update the sample to point to the location of the data once you have extracted all the files.
- Click File and click New to create a document window containing a MapControl, then click Close to exit the currently selected document window.
- Click Window and click Cascade, Tile Horizontally, or Tile Vertically to arrange the document windows in the application.
- Use the commands and tools on the ToolbarControl to load a map document and navigate around the data in the currently selected document window.
- Click a document window to select it or select it from the Window menu.
- 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.
AssemblyInfo.cs | Assembly information. |
ChildForm.cs | Form file. |
ParentForm.cs | Form file. |
AssemblyInfo.vb | Assembly information. |
ChildForm.vb | Form file. |
ParentForm.vb | Form file. |
Download the files for all languages
See Also:
ToolbarControl ClassIToolbarControl Interface
Development licensing | Deployment licensing |
---|---|
Engine Developer Kit | Engine |
ArcGIS for Desktop Basic | |
ArcGIS for Desktop Standard | |
ArcGIS for Desktop Advanced |