MapPoint Forums

MapForums

Community of MapPoint and Virtual Earth Users and Developers




MapPoin VB.Net

This is a discussion on MapPoin VB.Net within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Dear All I have a problem with MapPoint in my vb.net application. I use MapPoint to show my vehicles on ...


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

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



Click here to register

Reply

 

LinkBack (1) Thread Tools Display Modes
  1 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 02-08-2006
Junior Member
White Belt
 
Join Date: Feb 2006
Posts: 9
MapPoin VB.Net

Dear All
I have a problem with MapPoint in my vb.net application.

I use MapPoint to show my vehicles on map.

My application is a MultiThread application and when I try to show a GPS Position on Map while MapPoint is busy to build the route I have a 'server busy' error.

Are there any properties or events to know when the MapPoint Activex is in busy state?

I try to use the "ReadyStateChange" event but it doesn't occur during route building and other functions.

Thanks Matteo
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 02-08-2006
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,177
Hi,

The 'server busy' shows up because your application does not resond to windows messages.
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 02-09-2006
Junior Member
White Belt
 
Join Date: Feb 2006
Posts: 9
Thanks Wilfried for answer

But are there any properties or event to know when MapPoint ActiveX Control is busy state to prevent this error message?

Thanks again
Matteo
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 02-09-2006
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,177
Hi,

The 'server busy' popup is in fact a very confusing message. It does not mean mappoint is busy, it means that mappoint is trying to process windows messages to your application and your application does not respond. But that's not all. I try to explain when it can show up:

- Your application is not pumping messages on a (hidden) window. This can for example happen if it is looping somewhere during a long time. (I think >= 10 seconds). If that is the case then optimize the length operation or move it into a background thread.

- Your application is pumping messages, but has a modal form in one of the Mappoint events. For example a popup menu.

- If your application is multithreading and there is a hidden window created in one of the threads, be sure to have a working message pump in that thread. Note that this is not nececary if you have no window over there.

There could be more reasons but this are the only one I am aware off. For example your application is multithreading. I think mappoint is thread safe, but I hope you dont access same mappoint instance from more than 1 thread, or does not call some methods from within a different thread context that the thread that created mappoint (normally UI thread).
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 02-09-2006
Junior Member
White Belt
 
Join Date: Feb 2006
Posts: 9
Thanks a lot for your reply.
The problem is that I call some methods from different threads.
I probably solved my problem using a VB.NET "Mutex" class to syncronize different threads.

In your opinion, would it be a solution declare MapPoint variable as "Shared"?

Thanks a lot again
Matteo
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 02-09-2006
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,177
Hi Matteo,

Declaring as shared is in my opinion not a solution. You indeed probably solved the problem with synchronizing your threads. But I also think it is only temporary solved.

If you create a component in a particular thread context, normally you have to call all his events also from within same thread context. Synchronizing does not help, the context is what matters.

Note that synchronizing threads is actually disable multithreading

If you really need thread, then I advice if you wants to call mappoint methods then do it in main thread context. The most easy way to do it is to PostMessage to the main thread. Then the custom message handler do the call.

in dotNet you can easy P/Invoke this win32API call. I think in version 2 they have done it theirselve but I still use my own.
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 02-10-2006
Junior Member
White Belt
 
Join Date: Feb 2006
Posts: 9
Thanks a lot for your help, Wilfried
Now I will think about the situation.
Bye Matteo.
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
mappoin, vbnet


LinkBacks (?)
LinkBack to this Thread: http://www.mapforums.com/mappoin-vb-net-4761.html

Posted By For Type Date
MAPPOIN | VIRGILIO Ricerca | Web This thread Refback 02-18-2009 10:09 AM

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
Is there a patch or update to download for MapPoin.... Anonymous MapPoint 2006/2009 Discussion 1 07-03-2002 08:36 AM
I am working on a large presentation using Mappoin.... Anonymous MapPoint 2006/2009 Discussion 1 06-26-2002 09:22 AM
I've found many addresses that were not on MapPoin.... Anonymous MapPoint 2006/2009 Discussion 1 11-05-2001 10:11 AM
Hello - I'm plotting point locations over MapPoin.... Anonymous MapPoint 2006/2009 Discussion 1 10-11-2001 10:18 AM
Can 'customer symbols" be saved within the MapPoin.... Anonymous MapPoint 2006/2009 Discussion 1 09-04-2001 08:27 AM


All times are GMT -5. The time now is 10:35 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0 RC2
MP2K Magazine
Visitor Map

Bodrum Holiday
Check out the picturesque towns on your Bodrum holiday... Book through UlookUbook!



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 53 54 55 56 57 58 59