PDA

View Full Version : 2006 and 2009 at same time in VB6



Jack Ray
03-19-2009, 06:07 PM
Is it possible for the same VB6 app to use either MapPoint 2006 or MapPoint 2009 - whichever is installed on a given PC ? We call MapPoint from VB6 apps, to show routes for our customers' customers and to optimize routes, etc.

Most of our customers have MapPoint 2006 but new customers are buying MapPoint 2009.

I have 2006 and 2009 installed on my development PC (2009 installed last, in a separate directory). Both run fine from Start menu - however, when I create a VB6 exe and run it on a PC with MapPoint 2006, it blows up.

Private oMap As MapPointCtl.Map
Set oMap = MappointControl1.ActiveMap

The problem is in the above "Set" statement. My PC has 2009 ocx registered (for MappointControl1), but the other PC has just 2006.

Is there a way to make this work ? I can tell which mappoint (06 or 09) is installed..

Thanks

Eric Frost
03-19-2009, 08:07 PM
A solution (although inelegant) could be to detect which is installed and shell out and call "mappoint.exe /regserver" to the appropriate path/version... does this help?

Eric

xjack
03-20-2009, 08:17 AM
My customers have 3 versions of MapPoint 2004-2006-2009 ... I simply load a generic.ptm file created in the ealiest version and all three work fine ...