MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




Closing MapPoint

This is a discussion on Closing MapPoint within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hy, Has anybody found that closing the MapPoint ActiveX control is rather "dangerous"? I have found that on one system ...


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 (11) Thread Tools Display Modes
  11 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 05-02-2007
Junior Member
White Belt
 
Join Date: Apr 2007
Posts: 5
Closing MapPoint

Hy,

Has anybody found that closing the MapPoint ActiveX control is rather "dangerous"? I have found that on one system the application closed normaly (when closing the main form that contains the ActiveX control) but on other systems, the application hangs and refuses to close. I have to use the Task Manager to kill the process . I mention that i use MapPoint 2006.

What can i do?

Here is the code i use to open (start) the ActiveX control and the code to close it:

var Map1: TMap;

procedure StartMP;
begin
with Form1.OLEContainer do begin
DestroyObject;
CreateObject('MapPoint.Map.EU.13',FALSE);
DoVerb(PrimaryVerb);
OleObjectInterface.GetUserClassID(vGuid);
FMap := IDispatch(OleObject) as _Map;
with Map1 do
ConnectTo(FMap);
end;
end;
//--------------------------
procedure CloseMP;
begin
Form1.Close;
end;
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 05-03-2007
Junior Member
White Belt
 
Join Date: Oct 2006
Posts: 5
Re: Closing MapPoint

I had this problem of getting MapPoint.exe to close when the VB.Net app containing the ActiveX control was closed.
The solution I found was to ensure that the CloseMap method of the ActiveX control was called in the form's Closing event. Then all went well!
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 05-04-2007
Junior Member
White Belt
 
Join Date: Apr 2007
Posts: 5
Re: Closing MapPoint

Hy... But i don't have a CloseMap method... in the ActiveX control that is installed on Delphi there is no such method.
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 05-04-2007
Junior Member
White Belt
 
Join Date: Oct 2006
Posts: 5
Re: Closing MapPoint

Hmmm. I'm using .Net and the control there certainly has CloseMap.
All I can offer is a link to the Microsoft MSDN Library where it is described:
CloseMap method
My .Net projects reference the MapPoint Control 13.0 (MapPoint 2006) via:
AxInterop.MapPoint.dll
and
Interop.MapPoint.dll
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 08-18-2008
Junior Member
White Belt
 
Join Date: Aug 2008
Posts: 6
Question Re: Closing MapPoint

My problem is that CloseMap hangs and that's why I need to close Mappoint.exe. Here's the scenario:
We go thru a bunch of maps over and over and on occasion CloseMap just hangs. Currently it requires human intervention. We would like to be able to recover from this situation and close mappoint programmatically. I've tried numerous situations and none seem to be quite appropriate in this circumstance. Of note is the fact that there may be other programs on the server that are using Mappoint, so more than one MapPoint process may be running on the computer.

Anyone had similar problems and/or has a solution?

Thanks in advance
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 08-19-2008
Junior Member
White Belt
 
Join Date: Oct 2006
Posts: 5
Re: Closing MapPoint

I'll have a play with that scenario (several MapPoint processes in use) and see what I can find out.
This is the code I use in VB 2005 (ThisMap is a MapPoint.Map, mp is an AxMapPoint.MapPointControl) :


If Not ThisMap IsNothingThen _
ThisMap.Saved = True ' Trick MapPoint into thinking it doesn't have to save the map.
Try
mp.CloseMap()
Catch
EndTry
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 08-19-2008
Junior Member
White Belt
 
Join Date: Aug 2008
Posts: 6
Re: Closing MapPoint

Yep we do that (the saveMap I mean, either saving it or faking it out to think ie's saved), but sometimes CloseMap just dies out on us. Doesn't come back for the call for ages (overnight even).


Thanks in advance for your checking on it.
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 08-19-2008
Junior Member
White Belt
 
Join Date: Oct 2006
Posts: 5
Re: Closing MapPoint

Well, I've tried running several copies of my app simultaneously, along with opening MapPoint in the normal way. All these processes closed down properly.
Sorry I can't be of more help.
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 08-19-2008
Junior Member
White Belt
 
Join Date: Aug 2008
Posts: 6
Re: Closing MapPoint

I understand. Trust me replication has been a b*** for this problem. Sometimes you have to wait for hours for the problem to occur on a non-debugging machine. LOL

If anyone else has any ideas, I'm willing to listen.
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
closing, mappoint


LinkBacks (?)
LinkBack to this Thread: http://www.mapforums.com/closing-mappoint-5857.html

Posted By For Type Date
Paul Larson Develops Free Tool To Set Driving Speeds - MapPoint News - MP2K Magazine This thread Refback 05-15-2007 06:06 PM
Using MapPoint In Delphi - MapPoint Articles - MP2K Magazine This thread Refback 05-14-2007 02:34 PM
Snap to a Road - MapPoint Articles - MP2K Magazine This thread Refback 05-14-2007 02:24 PM
Delphi Address Verifier - MapPoint Articles - MP2K Magazine This thread Refback 05-14-2007 02:22 PM
An API to Control MapPoint 2006 GPS Features - Part I of II - MapPoint Articles - MP2K Magazine This thread Refback 05-10-2007 08:02 PM
Using MapPoint In Delphi - MapPoint Articles - MP2K Magazine This thread Refback 05-10-2007 03:18 PM
Company Profile: Pocket Real Estate - MapPoint Articles - MP2K Magazine This thread Refback 05-10-2007 02:18 PM
Extending the MapPoint ActiveX Control - Pt. I - MapPoint Articles - MP2K Magazine This thread Refback 05-09-2007 01:06 PM
Pocket Streets Conversion Tool Made Available - MapPoint News - MP2K Magazine This thread Refback 05-09-2007 12:09 PM
Working With Excel and MapPoint - MP2K Magazine This thread Refback 05-08-2007 01:33 AM
Microsoft MapPoint 2006 - MP2K Magazine This thread Refback 05-04-2007 01:46 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
MapPoint crashs after closing the application Elbarto MapPoint 2006/2009 Discussion 12 12-30-2006 10:47 PM
mapPoint 2006 activex control slow down form closing bule MapPoint 2006/2009 Discussion 1 09-26-2006 02:22 PM
Disabling closing of MapPoint? MD2000 MapPoint 2006/2009 Discussion 1 05-09-2005 05:57 PM
Closing: MapPoint process stilll running MD2000 MapPoint 2006/2009 Discussion 4 04-29-2005 09:58 AM
Closing without saving Mudrover MapPoint 2006/2009 Discussion 1 01-30-2005 08:49 AM


All times are GMT -5. The time now is 02:07 PM.


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


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