Community of MapPoint and Virtual Earth 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 the ...
| |||||||
| Today's Posts | Twitter Feed | 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 See the Geoweb Guru for online mapping |
| |||
|
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 See the Geoweb Guru for online mapping |
| |||
|
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 |
![]() |
| Tags |
| collection, garbage |
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 |
Corfu Holiday
Why not enjoy the option of a Corfu holiday through UlookUbook? Check out the online offers...