Welcome to MapForums!

Register, sign in, or use Facebook Connect above to join in and participate in the forum.

When you are signed in, this message, the ads in this row, and the red-underlined link ads all go away.

Subscribe to receive our newsletter.
Subscribe Unsubscribe
Page 1 of 2 12 LastLast
Results 1 to 10 of 18

switching from 04 activex to '06 in .NET

This is a discussion on switching from 04 activex to '06 in .NET within the MapPoint Desktop 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 ...

  1. #1
    nprimex1 is offline 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??

  2. #2
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433
    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.

  3. #3
    xjack is offline Junior Member Yellow Belt
    Join Date
    Sep 2006
    Posts
    17
    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 ???

  4. #4
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433
    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

  5. #5
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433
    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.

  6. #6
    xjack is offline Junior Member Yellow Belt
    Join Date
    Sep 2006
    Posts
    17
    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

  7. #7
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433
    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.

  8. #8
    nprimex1 is offline 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#.

  9. #9
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433
    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.

  10. #10
    nprimex1 is offline 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 ?

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. New to MP/using activeX
    By lucci56 in forum MapPoint Desktop Discussion
    Replies: 3
    Last Post: 07-16-2006, 04:42 PM
  2. Switching from Staging to Production
    By Jeff Smith in forum Bing Maps and MapPoint Web Service
    Replies: 1
    Last Post: 03-29-2005, 09:06 AM
  3. switching from 2004 to 2002
    By Wilfried in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 02-17-2005, 03:19 AM
  4. Switching place names off
    By Winwaed in forum MapPoint Desktop Discussion
    Replies: 3
    Last Post: 08-17-2004, 12:28 PM
  5. WebForms - switching between
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 03-26-2004, 07:54 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


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