Print Tool


This sample implements the ICommand and ITool interfaces and is intended to be used within the ArcMap application. The user drags a rectangle on the screen, and then that rectangle is printed to the current printer. The user can specify the printer and paper details by holding down the ctrl key when activating the tool.

How to use:
  1. In the Customize dialog, click on Add from file and select this sample's dll.
  2. Under the Commands tab, select the Print command from the Developer Samples category, and drag it on to a toolbar. Dismiss the Customize dialog.
  3. Click on the tool, and start using it.


Difficulty: Intermediate

Visual Basic
File Description
clsPrint.cls Class file that implements the COM Server.
frmResources.frm VB Form file holding resources used within project
PrintTool.dll Compiled project DLL.
PrintTool.vbp Visual Basic project file.

Key CoClasses: Envelope, Map, NewEnvelopeFeedback, Point, ScreenDisplay, PsPrinter
Key Interfaces: IActiveView, IEnvelope, INewEnvelopeFeedback, IPaper, IPrinter, IPsPrinter, IScreenDisplay