Load a map document into the PageLayoutControl


Purpose
This sample demonstrates how to load a map document into the PageLayoutControl using the Browse dialog box.

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.

  1. Browse to a map document to load into the PageLayoutControl. The map document can be an ArcMap document (.mxd), an ArcMap template (.mxt), or a Published Map File (.pmf).

Additional information

The Browse dialog box allows you to search and select map documents—.mxd, .mxt, and .pmf files—that are loaded into the PageLayoutControl using the LoadMxFile method. Since .pmf files can be password protected, use IMapDocument.IsPasswordProtected to check for a password. If the document is password protected, you will be prompted for the password.

AssemblyInfo.cs Assembly information.
LoadMap.cs Form file.
Password.cs Form file.
Download the C# files
AssemblyInfo.vb Assembly information.
LoadMap.vb Form file.
Password.vb Form file.
Download the VB.NET files

Download the files for all languages

See Also:

PageLayoutControl class
IPageLayoutControl interface




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