MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




problem with minimize\restore trick

This is a discussion on problem with minimize\restore trick within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; hi all i am developping, with visula studio 2005 and c#, an application which use mappoint...and in the main form ...


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 (3) Thread Tools Display Modes
  3 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 11-21-2006
Junior Member
Yellow Belt
 
Join Date: Sep 2006
Posts: 14
problem with minimize\restore trick

hi all i am developping, with visula studio 2005 and c#, an application which use mappoint...and in the main form i have an activex control which gives the possybility to a user to navigate, zoom the map in the control....

so there is the memory leak of mappoint : the memory grows without stopping after a lot o f zoom...

i have read about the trick of minimize and maximize so i have imported the user32.dll and i send the windows message minimize(code 0xF020) and restore (0xF120) ...the question is: to what handle have I to send the message?

i have tried to send to the mainForm and to the activex1 but i have not seen any grown down of memory in task manager...

please can you help me?
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 11-21-2006
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,122
Re: problem with minimize\restore trick

Hi,

Possible it does not work always. What happens if you do this:

Code:
WindowState = FormWindowState.Minimized;
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 11-21-2006
Junior Member
Yellow Belt
 
Join Date: Sep 2006
Posts: 14
Re: problem with minimize\restore trick

Code:
WindowState = FormWindowState.Minimized;
no with this code i don't have any decrement of the memory usage...

you say that not always the trick works but if i open the microsoft mappoint program (not my application but the Microsoft one) the trick of minimize restore works...only with my application this isn't useful...

I have also tried this...usinge the findwindow function i have search for the window named Map - Microsoft MapPoint Europe...which is the one my application use in background as resulte of the inizialization of the activex control..the trick decrese the memory but then there are problem, after the calling to minimize i have the mappoint application in the system tray..and then if i recall the sendmessage to minimize no useful behaviour for the memory...


How can i solve this memory leaj of MapPoint is impossible to use it in a good professional application if it contiues to eat memory...

do you have any solution ?
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 11-21-2006
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,122
Re: problem with minimize\restore trick

Hi,

I never have run out of memory with my applictions using mappoint, however I must say that the applications that run 24/7 are creating an instance if nececary and destroy it after a while if no one needs it anymore. As for the desktop applications I think most people shut it down once a while because lots of programs leak memory. So I did a test.

Did a zoom in / zoom out in a timer every half second. At start MP needed 25 MB, climing up after a few minute to 55 MB. After 10 minute it was 56.7 MB, after 20 minute it was 58 MB. All with a zoom every half second.

So I agree there is a leak, but I dont think many (if one) customar will see it or having trouble with 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
  #5 (permalink)  
Old 11-22-2006
Junior Member
Yellow Belt
 
Join Date: Sep 2006
Posts: 14
Re: problem with minimize\restore trick

thanks a lot for your care...

i think that i don't use any control, and if i would find that some customers have a problem i'll build up a memory control...

best regards
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
minimizerestore, problem, trick


LinkBacks (?)
LinkBack to this Thread: http://www.mapforums.com/problem-minimize-restore-trick-5377.html

Posted By For Type Date
Formatting coordinates with DmsFormat, linking to weather data, three new utilities - MP2K Update Archives - MP2K Magazine This thread Refback 11-23-2006 12:06 PM
Microsoft MapPoint 2006 - MP2K Magazine This thread Refback 11-21-2006 11:14 PM
The Magazine for MapPoint - MP2K Magazine This thread Refback 11-21-2006 07:48 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
save / restore map settings Wilfried MapPoint 2006/2009 Discussion 1 02-09-2005 10:06 AM


All times are GMT -5. The time now is 10:50 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