Welcome to MapForums!

Register, sign in, or use Facebook Connect above to join in and participate in the forum.

When you are signed in, this message, the ads in this row, and the red-underlined link ads all go away.

Subscribe to receive our newsletter.
Subscribe Unsubscribe
Results 1 to 5 of 5

problem with minimize\restore trick

This is a discussion on problem with minimize\restore trick within the MapPoint Desktop 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 ...

  1. #1
    bule is offline 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?

  2. #2
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433

    Re: problem with minimize\restore trick

    Hi,

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

    Code:
    WindowState = FormWindowState.Minimized;

  3. #3
    bule is offline 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 ?

  4. #4
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433

    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.

  5. #5
    bule is offline 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

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. save / restore map settings
    By Wilfried in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 02-09-2005, 10:06 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


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