spacer1
spacer2 1_1 1_2
2_1
 Subscribe
 The MP2K Update!
 
 
 
 Magazine
Front Cover
What's New
Articles
News
Sample Data
Gallery
Advertise
About
 Features
MapPoint 2013
Press Releases
MapPoint Forums
Companies
Link to MP2Kmag
Wish List
MapPoint Trial
Authors
 Earlier Content
Past News Items
Past What's New Announcements
 Sponsors
 Order

MapPoint 2013

Programming MapPoint in .NET

MapPoint Book

  Spatial Community
SVG Tutorials
MapPoint

Map Visitors

  ARTICLES  


Developing with MapPoint and Visual Studio Part 2: The ActiveX component

In this follow-up to his article last year on Developing with Visual Studio 2010 and MapPoint, Wilfried Mestdagh now shows how to get started with the ActiveX Control

Sometimes people think MapPoint's architecture is so archaic is doesn't work with modern development tools. Well, nothing is less true. Every modern development tool is perfecly suited to use. This article is a small tutorial on how to start with MapPoint in VS2010, using the provided ActiveX control.

OK, let's do it. I assume you have installed Visual Studio 2010 and MapPoint 2010 (or any other version).

We start the development tool and create a new windows forms application. First thing to do is to add the MapPoint control to the toolbox. To do this right click in the toolbox and click on 'Choose Items' as shown below.

Next click the tab 'COM Components' and check 'Microsoft MapPoint Control 17' as shown below, then click 'OK'.

Congratulations, the MapPoint control is now add to your toolbox as shown below. Click it and drop it on your form.

Next thing to do is what you (hopefully) always do after dropping a component to a form and that is: give it a non-confusing exclusive name. For example 'MP'. Now we are going to add a little code. First of all you have to include the mappoint class in your code. Then in the constructor of the form we open a new map, and we assign a FormClosing event where we set the 'Saved' property true because we don't want a popup window saying: 'Save the map?' every time we close our application. Both is shown below.

Et voila we are done. If you compile and run your appliction you have MapPoint sitting on your form and you can code whatever you wish to do with it. Happy coding :)

Discuss this story in the forum.

Author: Wilfried Mestdagh
Email: wilfried(AT)mestdagh.biz
Wilfried Mestdagh works as software engineer at the company Sonal in Mortsel, Belgium. His main work is writing software for fleet management and onboard computers. Fleet management is mainly written in Delphi and C# while the onboard computers are mostly programmed in C. His department started years ago for specializing in tracking and tracing security and dangerous transport vehicles, but it is grown to satisfy a very wide of vehicle / truck fleet customers.



Google
 
MP2Kmag Internet


 Recent Discussion
-Petrosys v17.7
-Catopo.v2.5.3
-The Unscrambler X 10.5
-CATENA SIMetrix SIMPLIS v8.0.Win
-Petroleum Workbench Interpret v2003
-Textile and Garment Software
-CARIS HIPS and SIPS v10.4.2
-Petroleum Software AC Piping Software
-Tetraface Inc Metasequoia v4.6.5
-CAMTOOL.v12
-Petroleum Experts IPM v9.0.152
-linkmaster v3.0.84
-Testif-i v2.07a
-Samplephonics Vive Le Funk MULTiFORMAT
-CAMBASE v8.0
-Marvelous Designer 5 v2.3.53 Personal
-Serif WebPlus X7 15.0.2.31
-Autodesk ReCap Pro 2018 R4
-Adobe Dimension CC 2018 v1.1.1.0 (x64)
-Articulate Storyline 3.3.15007.0
-Steinberg Cubase Ai Elements v7.0.80 (x86/x64)
-Active File Recovery Ultimate 14.5.0.2
-Scientific Toolworks Understand 4.0.840 (Win/Mac/Lnx)
-DevExpress DXperience Universal 15.2.4 + Components
-CADprofi version 11.09
 Resources
Browse GIS books and periodicals
Find a MapPoint Partner or Consultant
Real Estate Columbia For Sale By Owner


Want Your Site To Appear Here?

   © 1999-2012 MP2K. Questions and comments to: website@mp2kmag.com
  Microsoft and MapPoint 2002/2004/2006/2009/2010/2011/2013 are either trademarks or registered trademarks of Microsoft.