Key controls to use in desktop applications, Mapcontrol – Pitney Bowes MapXtreme User Manual
Page 128

Chapter 7: Desktop Applications, Controls, Dialogs, and Tools
Key Controls to Use in Desktop Applications
MapXtreme v7.1
128
Developer Guide
Key Controls to Use in Desktop Applications
While all the controls included in MapXtreme are useful, several stand out from the rest as being
central to most mapping applications. The following sections discuss these. Each of these controls
assume the presence of the appropriate references included in your project. (These are
automatically included if you have created your project from the MapXtreme MapForm template in
Visual Studio).
L
If you are not creating your project from one of our templates, please make sure to add
references to the appropriate components (for example, MapInfo.CoreEngine,
MapInfo.Windows, MapInfo.Windows.Dialogs, and MapInfo.Windows.Framework). See also
.
MapControl
The MapControl is necessary for every application that displays a map. To add a MapControl to your
form, drag it onto your form from the toolbox in Visual Studio. Once the MapControl is on your form
there are several operations you can perform on it to make your map more useful to the user.
Modifications to the MapControl can be performed via the Properties Window when the MapControl
is selected on your form. Right-click on the MapControl in design-mode to display a context menu
with the following choices: Load Map, Clear Map, Layer Control, and Create Thematic. Load Map
opens a standard file chooser from which the developer can choose a map to preload into the
MapControl. Clear Map clears any map already in the control, either when adding the MapControl to
the form or somewhere in the middle of the design process. Layer Control launches a Layer Control
dialog box that allows you to customize the map (see
). Create Thematic launches
) allowing you to create a theme on the map.