Community of VE/MapPoint Users and Developers
This is a discussion on garbage collection within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; I am having trouble with garbage collection, I wonder if anyone can help... Using MP2004 OCX, vb5 I've read ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| garbage collection Using MP2004 OCX, vb5 I've read the articles about forcing garbage collection by using the Sendmessage API call, and getting the hwnd of the mappoint control via Sergiy Pavlov's code. so I started with sergiys program http://www3.sympatico.ca/spavlov/mappoint_extended.zip and added the deffinition Public Const SC_MINIMIZE = &HF020 and a command button Private Sub Command1_Click() Dim TWnd As New TWindow Dim lResult As Long TWnd.hwnd = objMap.hWnd_Frame lResult = SendMessage(TWnd.hwnd, WM_SYSCOMMAND, SC_MINIMIZE, 0) End Sub Clicking the button seems to do nothing, no minimise, no change in memory useage, what am I doing wrong?! |
| ||||
|
It may not work with a control. Also that code finds the window by looking for a window with the correct title bar. So that needs a MapPoint application rather than a control. (and you have to use the correctly title text) You could try minimising the window that is holding the control? I don't know if that works, but it might force the control to minimise? I suspect it won't, but it is definitely worth a try. Richard
__________________ Winwaed Software Technology LLC http://www.winwaed.com See http://www.mapping-tools.com for MapPoint Tools Pre-Order MapPoint 2009 today: http://www.mapping-tools.com/mappoint2009 |
| |||
|
thanks for the response. Minimising the form deffinately does not work. I have also tried using api calls to get the controls hwnd and snding a minimise to it, all to no avail. This is cripling my software! Any other suggestions? |
| ||||
|
I think you're in new territory here! Another area where you can't force the garbage control using this method, is from an add-in. One option might be to split your MapPoint working into two processes? The intensive memory-growing stuff is in an application? Or to close and restart MapPoint on a regular basis? Richard
__________________ Winwaed Software Technology LLC http://www.winwaed.com See http://www.mapping-tools.com for MapPoint Tools Pre-Order MapPoint 2009 today: http://www.mapping-tools.com/mappoint2009 |
| |||
|
The whole thing is one large vb5 application, in use 24/7, with one momentary shutdown at 04:30. The problem with opening/closing the maps is that by the time they have a good few pushpins and shapes drawn the close/open process (on a p4 2.4Ghz, 512M RAM) is typicaly taking 5-10 seconds, which seriously irritates operators. |
| |||
| Re: garbage collection
Hi, I'm using MapPoint 2004 in an activeX control, and I need to execute garbage collection. I'm using it in 2 separate application : 1 written en C# and the other in Java. Questions : - Is there better way to free memory than saving+opening the map, or sending a minimize message? - If there is not, how to send a minimize/restore message in C# and Java? - Will the MP memory usage be reduced by the OS when all RAM is used and the user then uses/launches other apps thus needing more memory? (If yes, I won't bother with this problem) Thanks in advance for any help. |
| |||
| Re: garbage collection
Hi, You dont need to send/post a message, just set the property in your application if you use the activeX control: Code: WindowState = FormWindowState.Minimized;
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Garbage collection | daxydoggie | MapPoint 2006/2009 Discussion | 3 | 05-04-2005 12:35 PM |
| This forum is GARBAGE !!! | Anonymous | MapPoint 2006/2009 Discussion | 4 | 12-30-2004 01:53 PM |
| Garbage Anyone? | daxydoggie | MapPoint 2006/2009 Discussion | 0 | 11-22-2004 10:16 AM |
| requested member of collection does not exist | Anonymous | MapPoint 2006/2009 Discussion | 0 | 11-16-2004 07:22 AM |
| limiting objects in collection | Anonymous | MapPoint 2006/2009 Discussion | 0 | 04-27-2004 07:52 AM |
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!