18.04.2015 Views

ArcGIS Engine Developer Guide

ArcGIS Engine Developer Guide

ArcGIS Engine Developer Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

BUILDING APPLICATIONS WITH ACTIVEX<br />

' Add PageLayout navigation commands.<br />

sProgID = "esriControlTools.ControlsPageZoomInTool"<br />

ToolbarControl1.AddItem sProgID, , , True, , esriCommandStyleIconOnly<br />

sProgID = "esriControlTools.ControlsPageZoomOutTool"<br />

ToolbarControl1.AddItem sProgID, , , False, , esriCommandStyleIconOnly<br />

sProgID = "esriControlTools.ControlsPagePanTool"<br />

ToolbarControl1.AddItem sProgID, , , False, , esriCommandStyleIconOnly<br />

sProgID = "esriControlTools.ControlsPageZoomWholePageCommand"<br />

ToolbarControl1.AddItem sProgID, , , False, , esriCommandStyleIconOnly<br />

sProgID = "esriControlTools.ControlsPageZoomPageToLastExtentBackCommand"<br />

ToolbarControl1.AddItem sProgID, , , False, , esriCommandStyleIconOnly<br />

sProgID = "esriControlTools.ControlsPageZoomPageToLastExtentForwardCommand"<br />

ToolbarControl1.AddItem sProgID, , , False, , esriCommandStyleIconOnly<br />

' Add Map navigation commands.<br />

sProgID = "esriControlTools.ControlsMapZoomInTool"<br />

ToolbarControl1.AddItem sProgID, , , True, , esriCommandStyleIconOnly<br />

sProgID = "esriControlTools.ControlsMapZoomOutTool"<br />

ToolbarControl1.AddItem sProgID, , , False, , esriCommandStyleIconOnly<br />

sProgID = "esriControlTools.ControlsMapPanTool"<br />

ToolbarControl1.AddItem sProgID, , , False, , esriCommandStyleIconOnly<br />

sProgID = "esriControlTools.ControlsMapFullExtentCommand"<br />

ToolbarControl1.AddItem sProgID, , , False, , esriCommandStyleIconOnly<br />

' Load a preauthored…<br />

End Sub<br />

3. Run the application. The ToolbarControl now contains <strong>ArcGIS</strong> <strong>Engine</strong> commands<br />

and tools that you can use to navigate the map document loaded into<br />

the PageLayoutControl. Use the page layout commands to navigate around the<br />

actual page layout and the map commands to navigate around the data present<br />

in the data frames. Use the open document command to browse and load<br />

other map documents.<br />

Chapter 6 • <strong>Developer</strong> scenarios • 289

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!