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 />

Rather than walk through this scenario, you can<br />

get the completed application from the samples<br />

installation location. The sample is installed as<br />

part of the <strong>ArcGIS</strong> developer samples.<br />

The <strong>ArcGIS</strong> developer samples are not included<br />

in the typical installation of the <strong>ArcGIS</strong> <strong>Engine</strong><br />

<strong>Developer</strong> Kit. If you do not have them installed,<br />

rerun the <strong>Developer</strong> Kit Install wizard, click<br />

Custom or Modify, and click the samples feature<br />

under Software developer kit.<br />

ActiveX is another term for a Microsoft Component<br />

Object Model object. All of ArcObjects is<br />

based on COM, and the <strong>ArcGIS</strong> controls are<br />

COM objects.<br />

This walkthrough is for developers who want to build and deploy an application<br />

using ActiveX. It describes the process of building and deploying an application<br />

using the <strong>ArcGIS</strong> controls.<br />

You can find this sample in:<br />

\<strong>Developer</strong>Kit\samples\<strong>Developer</strong>_<strong>Guide</strong>_Scenarios\<br />

Building_an_<strong>ArcGIS</strong>_Controls_Map_Viewer_ApplicationVisual_Basic.zip<br />

PROJECT DESCRIPTION<br />

The goal of this scenario is to demonstrate and familiarize you with the steps<br />

required to develop and deploy a GIS application using the standard <strong>ArcGIS</strong><br />

controls within a COM API. This scenario uses the MapControl,<br />

PageLayoutControl, TOCControl, ToolbarControl, and LicenseControl as<br />

ActiveX Controls within the Microsoft Visual Basic 6.0 development environment.<br />

C++, Java, and .NET programmers should refer to the following scenarios<br />

available later in this chapter: ‘Building a command-line C++ application’, ‘Building<br />

applications with visual JavaBeans’, ‘Building a command-line Java application’,<br />

and ‘Building applications with Windows Controls’.<br />

This scenario demonstrates the steps required to create a GIS application for<br />

viewing preauthored ESRI map documents, or MXDs. The scenario covers the<br />

following techniques:<br />

• Loading and embedding the <strong>ArcGIS</strong> controls in Microsoft Visual Basic 6.0<br />

• Loading preauthored map documents into the MapControl and<br />

PageLayoutControl<br />

• Setting ToolbarControl and TOCControl buddy controls<br />

• Handling form resize<br />

• Adding Control commands and tools to the ToolbarControl<br />

• Creating popup menus<br />

• Managing label editing in the TOCControl<br />

• Drawing shapes on the MapControl<br />

• Creating a custom tool to work with the MapControl, PageLayoutControl,<br />

and ToolbarControl<br />

• Customizing the ToolbarControl<br />

• License configuration using the LicenseControl<br />

• Deploying the application onto a Windows operating system<br />

CONCEPTS<br />

This scenario is implemented using the Microsoft Visual Basic 6.0 development<br />

environment and uses the <strong>ArcGIS</strong> controls as ActiveX components. ActiveX<br />

refers to a set of technologies that enables software components written in<br />

different languages to work together in a networked environment. Each ActiveX<br />

<strong>ArcGIS</strong> control has events, properties, and methods that can be accessed once the<br />

control is embedded within an ActiveX container such as a Visual Basic form.<br />

The objects and functionality within each control can be combined with other<br />

ESRI ArcObjects and custom controls to create customized end user applications.<br />

282 • <strong>ArcGIS</strong> <strong>Engine</strong> <strong>Developer</strong> <strong>Guide</strong>

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

Saved successfully!

Ooh no, something went wrong!