Community of VE/MapPoint Users and Developers
This is a discussion on Need to close then open MapPoint COM Object within the MapPoint 2006 Discussion forums, part of the Map Forums category; I have had some odd behavior and memory issues with MapPoint 2004 and was advised by Microsoft that I would ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| Need to close then open MapPoint COM Object This is the function I use to create an instance of MapPoint: private MapPoint.Map MakeNewMap( AxMapPoint.AxMappointControl mpControl ) { string objTemplate = Configuration.MapPointDir; mpControl.NewMap(objTemplate); return mpControl.ActiveMap; } Can anyone give me the code I need to unload this instance? When I use this function it fails: public void RefreshMapPointComObject() { axMappointControl1.ActiveMap.Saved = true; axMappointControl1.Dispose(); MakeNewMap(axMappointControl1); } I get COM Object seperated from its underlying connection. How do I destroy the COM object completely then recreate it so I can start using it again?? I have made sure to remove any and all references to it. I assume if I get the right call (CloseMap() does not work) that I can see it close in Task manager. Am I right about that? Does it take some time for this to take place? I even tried this in an attempt to remove the MapPoint COM object: axMappointControl1.ActiveMap.Saved = true; axMappointControl1.CloseMap(); Trip.NAR(axMappointControl1.ActiveMap); this.Controls.Remove(this.axMappointControl1); but with no luck. The MapPoint.exe program is still listed in the Processes page of the Task Manager. Can anyone tell me how to get rid of it?? I need to do this so I can then reload it. Thanks, Bob |
| |||
| Re: Need to close then open MapPoint COM Object
Hi, This will create a new activeX control: Code: AxMapPoint.AxMappointControl mp; mp = new AxMapPoint.AxMappointControl(); Controls.Add(mp); mp.Visible = false; mp.OpenMap(fileName); Code: Controls.Remove(mp); mp.Dispose();
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
![]() |
| ||||
| Posted By | For | Type | Date | |
| Using MapPoint In Delphi - MapPoint Articles - MP2K Magazine | This thread | Refback | 02-24-2008 01:26 PM | |
| Finding the Starting Point of a Route - MapPoint Articles - MP2K Magazine | This thread | Refback | 02-20-2008 06:46 PM | |
| Pushpin Tool Add-in - MP2K Magazine | This thread | Refback | 02-19-2008 02:18 PM | |
| MapPoint Download - MP2K Magazine | This thread | Refback | 02-18-2008 06:07 PM | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| MapPoint 2006 ActiveX with Form.Close | jasanite | MapPoint 2006 Discussion | 6 | 08-09-2007 02:29 PM |
| How to close MapPoint applications correctly? | doMapPoint | MapPoint 2006 Discussion | 12 | 05-30-2007 12:02 PM |
| MapPoint OCX SLOW on close. | Gianmaria | MapPoint 2006 Discussion | 3 | 01-31-2007 12:32 PM |
| How to properly close mappoint control | Anonymous | MapPoint 2006 Discussion | 1 | 03-03-2005 08:05 AM |
| Mappoint has encountered a problem and needs to close | Anonymous | MapPoint 2006 Discussion | 4 | 05-05-2004 03:40 PM |
Exeter Flights
Visit Holiday Hypermarket online to find all the essential information about Exeter Airport and Exeter flights. Booking is quick, easy and cheap with Holiday Hypermarket.
Best Travel Agent
Book your Travel with the UK's best Travel Agent - as named at the Guardian Unlimited Travel awards.
Portugal Holiday
For such a small country, you have many options from which to choose. A Portugal Holiday can include fantastic beaches and stunning scenery. Check out our great deals.
Holidays to Cuba
For the best offers on holidays to Cuba, visit The Holiday Place today. Find a deal to suit you and your budget online!
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.
Compare Holidays
Compare holidays online where you can see all the amazing possibilities at Travel.co.uk
Cheap Holidays to Lanzarote
Visit the Canary Islands, even if you're cash strapped! View cheap holidays to Lanzarote at On The Beach!