MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




switching from 04 activex to '06 in .NET

This is a discussion on switching from 04 activex to '06 in .NET within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; wow, well I really appreciate the help i've received from this forum over the last year. Honestly, haven't been putting ...


Go Back   MapPoint Forums > Map Forums > MapPoint 2006/2009 Discussion

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read



Click here to register

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-21-2006
Junior Member
White Belt
 
Join Date: Mar 2006
Posts: 11
switching from 04 activex to '06 in .NET

wow, well I really appreciate the help i've received from this forum over the last year.

Honestly, haven't been putting much time into dev ... just as I was getting somewhere with 04, 06 came out. I created a basic .NET C# MP app which tracks location via GPS.

I removed the activex control for 2004 and added activex MP 2006 control. However, now i'm getitng alot of classes not matching, etc.

I thought it was the same minus the 2 additional features and map data??
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 09-22-2006
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,105
Hi,

Correct nothing has to be changed.

However a application compiled with MP2004 ocx will not run with MP2006 map and also the way around. This is because the changed Location object which has now additional properties. Is that the problem ?

If you have another problem please explain, it should be solved easy (I hope), as it works here fine after upgrading to MP2006.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3 (permalink)  
Old 09-23-2006
Junior Member
White Belt
 
Join Date: Sep 2006
Posts: 8
I'm not quite following ... My application was compiled using the 2004 .ocx and includes a 2004 template ... The Mappoint application is installed on each individual client machine ... At present all clients are using 2004, but next week I have a new client installing who has 2006 installed ... Can I expect problems ???
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4 (permalink)  
Old 09-23-2006
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,105
Hi,

Unfortionally yes The problem is the Location object, it is different in MP2006, so accessing it will generate an access violation.

I just did an extra test to be sure. First registered MP2004 ocx, rebuild program, then registered MP2006 and start outside debugger (to be sure no recompile). The momen you want to do something with eg a returned Location object there was an AV.

So you really have to install MP2006 also on your develop machine. I register them with 2 batch files that also copy a file with a static class to a common folder where the development sourses are, so that it is al automated.

If you need more detail on how I did it then please say so. There are probably many approach but found this the most easy
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5 (permalink)  
Old 09-23-2006
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,105
Hi,

I forgot to say, I'm using C#. Possible behaviour in VB or others is different. For developers only using the type library (using MP object model) behaviour is probably also different.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6 (permalink)  
Old 09-25-2006
Junior Member
White Belt
 
Join Date: Sep 2006
Posts: 8
Wilfred ...

Thanks very much for the quick response ...

Re the batch files ... are these something to simply rename or move the appropriate files to the referenced locations and to the executable path ... run prior to compiling or debugging ???

I will probably start testing with this tomorrow and will probably have other questions ...

Again, thanks ...

Jack
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7 (permalink)  
Old 09-26-2006
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,105
Hi,

Yes and no. Tht batch files do 2 thing.
- They register the right MapPoint version
- They copy a file with a class so that compiled program know what mappoint version it need.

This way it can detect on runtime he is talking with the right mappoint before generating errors and give the user a warning.

In both of my MP folders I have batch file with this content:
Code:
MapPoint.exe /registerserver
copy MPVersion.cs C:\Ontwikkeling\NET\VC#\MP
So they register the right mappoint and copy the MPVersion.cs to a shared folder used in all my mappoint projects. Content of file is just the MP version:
Code:
namespace MPVersion
{
    public static class MPVersion
    {
		public const int Version = 13;
	}
}
Version 13 if MP2006 and 11 is MP2004. At runtime I compare the compiled version and the version in the Version property of the MP control and if they dont match I generate a warning and quit the program.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #8 (permalink)  
Old 09-26-2006
Junior Member
White Belt
 
Join Date: Mar 2006
Posts: 11
Hi Wilfried,

Thanks for taking the time to help me out here. I'm still trying to pinpoint my issue ... will post up exact details.

But a quick question ... in C#, have u been able to add in the "Driving Guidance" window and all it's functionality (voice command, etc.) ? I read the article for VB that's posted in the annoucnement, but was wondering if it was applicable to C#.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #9 (permalink)  
Old 09-26-2006
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,105
Hi,

Sorry cannot help on this one as I did not test this because lack off time and interesse. But if it works in VB then it should be applicable in C# as whell.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #10 (permalink)  
Old 09-27-2006
Junior Member
White Belt
 
Join Date: Mar 2006
Posts: 11
Hi Wilfried,

They say that in MapPoint 2006, the MapPointControl object is supported only in Visual Basic 6.0. MappointControl object is basically used to implement new additions in mp 2006

Basically I followed these steps as directed my Microsoft Mappoint Help

Referencing the MapPoint Control 13.0

In Visual Studio .NET 2003

On the Tools menu, select Add/Remove Toolbox Items.
In the Customize Toolbox dialog, select the COM Components tab.
In the list of components, select Microsoft MapPoint Control 13.0. Be sure to select the check box to the left of this component.
Click OK. The component has been added to your toolbox and can be used in a project.

So everything is fine and the activeX control reads Mappoint Control 13.0 and so does the axMappointControl object.

Does this mean that I will not be able to integrate the Driving Guidance Pane and the GPS Task Pane (2 new additions in MP 2006) in .NET using the Mappoint ActiveX Control 13.0 as guided by MSDN.

Is there any bypass to this in .NET ?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
activex, net, switching


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
New to MP/using activeX lucci56 MapPoint 2006/2009 Discussion 3 07-16-2006 03:42 PM
Switching from Staging to Production Jeff Smith MapPoint Web Service and Virtual Earth 1 03-29-2005 08:06 AM
switching from 2004 to 2002 Wilfried MapPoint 2006/2009 Discussion 0 02-17-2005 02:19 AM
Switching place names off Winwaed MapPoint 2006/2009 Discussion 3 08-17-2004 11:28 AM
WebForms - switching between Anonymous MapPoint 2006/2009 Discussion 0 03-26-2004 06:54 AM


All times are GMT -5. The time now is 05:40 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
MP2K Magazine
Visitor Map

Ski Breaks
Book ski breaks to a range of great ski destinations online at Holiday Hypermarket. It is quick, easy and best of all, fantast value.

Business Travel Agent
Leading Business Travel Agent. Personal service is at the heart of our business. Talk to one of our travel agents today.

Cheap Holiday Turkey
Booking a cheap holiday to Turkey doesn't have to be at the expense of enjoyment. Dealchecker.co.uk searches holidays from the leading UK Tour Operators.

Nile Cruises
Nile cruises are one of the best ways to discover the riches of Egypt. See ancient ruins and lush verdure from the River Nile. Book today!

Cheap Egypt Holidays
Pick up a bargain cheap Egypt holiday online when you visit ulookubook.com. Just check out our tips to make sure you book at the right time to get a great holiday for a great price. Finding cheap Egypt holidays can be simple when you know how.

Family package holidays
Save a lot of time and opt for one of the great family package holidays at Travel.co.uk

Cheap Holidays in Gran Canaria
Would you like to visit the Canary Islands, but you're on a budget? Get information on cheap holidays in Gran Canaria at On The Beach.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52