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
Page 1 of 2 12 LastLast
Results 1 to 10 of 16

What causes the MapPoint Control to stop scrolling?

This is a discussion on What causes the MapPoint Control to stop scrolling? within the Development forums, part of the MapPoint Desktop Discussion category; It's been a while since my last MapPoint programming, so please bear with me. Using MP 2006 just now. Probably ...

  1. #1
    MarcoK is offline Junior Member White Belt
    Join Date
    Aug 2007
    Posts
    7

    What causes the MapPoint Control to stop scrolling?

    It's been a while since my last MapPoint programming, so please bear with me. Using MP 2006 just now.

    Probably something well known and obvious, but I couldn't find an answer to my issue searching these forums and the rest of the web.

    I created a simple form and tacked a MapPoint control on it.
    (my first steps, obviously...)
    It essentially works fine, but every now and then, scrolling will just come to a halt even when I keep the mouse key pressed.
    (The MouseUp event doesn't fire)
    The problem gets worse the more I zoom in, and if I'm on city level scrolling will usually just make a tiny bump before it stops, forcing me to reinitiate scrolling by releasing the mousekey and pressing again, at which point it will again make a little movement and come to another halt ... etc.
    What causes this issue? Any obvious way around this?
    I figure I could disable "official" behavior and code my own movement handling, but I wonder if that issue shouldn't be easy to fix, somehow...
    Any ideas?

    Thanks in advance
    MarcoK

  2. #2
    Mattys Consulting's Avatar
    Mattys Consulting is offline Senior Member Black Belt
    Join Date
    Dec 2002
    Posts
    1,040

    Re: What causes the MapPoint Control to stop scrolling?

    Interesting; good question. I'm going to take a wild guess and say it is a cross
    between allocation of memory and window/mouse messages interfering with
    each other. Notice what happens without the mouse:
    MapPoint Spinning Globe Sample

    Mike Mattys

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

    Re: What causes the MapPoint Control to stop scrolling?

    Hi,

    I agree with Mike. However as far as I recall, the windows message queue has room for 10240 messages. I don't know how many messages are posted per second when pressing and holding the mouse button down (hmm interesting to know however).

    What is CPU load at that moment and eventually other programs running ?

  4. #4
    MarcoK is offline Junior Member White Belt
    Join Date
    Aug 2007
    Posts
    7

    Re: What causes the MapPoint Control to stop scrolling?

    That Spinning Globe example fails to run in VS.NET 2005.
    I'll try to implement my own keyboard based scrolling and I expect it to run, but that wouldn't really solve the issue.

    As for CPU load, it's pretty high, between 95% and 100%, most of the time the latter.

    However, upon experimenting at maximum zoomout I noticed some weird patterns.
    For example, the control will NEVER (thied ample times) hang when I stay far north so that basically the pole is rotated and I always have a lot of land on screen.
    However, the control will ALWAYS hang when running into the pacific and atlantic if I try to focus on the southern hemisphere.
    I can usually scroll across South America or Africa in one go (not always though), but then it'll hang again when faced with the next ocean.

    No such "luck" when being zoomed in, though. Then the hangs seem pretty random and happen at a very annoying pace everywhere.

    Edit: Is there a way to tell which arrow pointer the control is displaying? I tried with "MousePointer", but it always returns the default one, so is not a big help.

    _______
    MarcoK
    Last edited by MarcoK; 09-03-2007 at 03:06 AM.

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

    Re: What causes the MapPoint Control to stop scrolling?

    Hi,

    I did a test, and yes I see exactly same problem. With the control, but also with the the standalone executable. MP2006 but did try also MP2004 and it has same problem. Problem is probably due to detail. Above the see their is no detail, same count for Africa. Probably same problem in east Europe (did not try). That is also the reason that the problem persist when zoomed in.

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

    Re: What causes the MapPoint Control to stop scrolling?

    Hi,

    About the mouse pointer. Yes you pick right property but it will probably not work when you are on the borders of the map.

    However there are always workarounds. If you put on the borders 8 transparent panels, then you can display the pointer of your choice when mouse is hoovered over these panels.

  7. #7
    MarcoK is offline Junior Member White Belt
    Join Date
    Aug 2007
    Posts
    7

    Re: What causes the MapPoint Control to stop scrolling?

    Well, if details (or lack thereof) were the problem, the control shouldn't hang at all when zoomed in and there's lots and lots of stuff to display.
    In fact it's actually worse when zoomed in, though...

    Also, could you please elaborate a bit on the MousePointer issue?
    If I picked the right property, how do I tell which arrow it is displaying if all I ever get as a return value is "Default"?

    Edit: Oh, and about transparent panels, I guess it would be hard to make them match the arrow displayed at all times, so I would prefer checking the cursor instead.
    Or do you mean putting them beyond the control's borders to ensure scrolling still occurs when the user has lost the control boundaries?

    Thanks for taking the time to reply.
    ______
    MarcoK

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

    Re: What causes the MapPoint Control to stop scrolling?

    Hi,

    In fact it's actually worse when zoomed in, though
    Yes. But the lack of details is my only logical explanation for it...

    If I picked the right property, how do I tell which arrow it is displaying if all I ever get as a return value is "Default"?
    well I think that the cursor in the corners (so for scrolling) cannot change.

    about transparent panels, I guess it would be hard to make them match the arrow displayed at all times
    No. Each window (form, panel, whatever) can you give a cursor for its own (it's a property).

    Or do you mean putting them beyond the control's borders to ensure scrolling still occurs when the user has lost the control boundaries?
    No I mean "On" top of the map, all aligned to the borders of the map that so if user resize map they stay on correct position. As soon as the mouse hoover over the panel, cursor will change to your selected one for each of the panels.

  9. #9
    MarcoK is offline Junior Member White Belt
    Join Date
    Aug 2007
    Posts
    7

    Re: What causes the MapPoint Control to stop scrolling?

    Doesn't the fact that it doesn't actually happen that way when zoomed in make the theory less logical, though?

    About the mouse cursor issue ... I'm afraid I somehow don't get what you mean. At least not completely.
    As it is now (unmodified), the control changes the mouse cursor to various arrows depending on where the mouse is located and whether or not the mouse is being clicked.
    If I overlay the control with transparent panels with custom cursors onmouseover, I take it that would override the default behavior, but wouldn't that also basically FORCE me to write a completely custom handling?
    I realize I might have to do this eventually, but I'd prefer if I could keep out-of-the-box behavior intact as much as possible.

    What I was inquiring about was: How do I determine which cursor is currently displayed? The cursors ARE changing already, my preferred workaround would thus be to simply check which cursor is displayed and act accordingly.

    Naturally, I guess transparent panels would work, but it would involve a lot more custom handling to imitate behavior the control already includes.
    ______
    MarcoK

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

    Re: What causes the MapPoint Control to stop scrolling?

    Hi,

    MousePointer property seems not to change when the bitmap changes to the Pan arrow. As for the custom code it is not too hard. Only some code to change mousepointer depending where it is on the panel, and on mouse key down creation of a timer that excutes a Pan method every few milliseconds. Destroy timer in onMouseUp.

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Re: Keyboard control in mappoint activex control
    By djcapslock in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 03-10-2005, 11:16 AM
  2. Stop User from exiting
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 11-02-2004, 10:37 AM
  3. How to stop MapPoint from selecting a wrong address?
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 06-09-2004, 09:03 AM
  4. Need help with map scrolling arrows please!
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 09-09-2003, 11:29 AM
  5. Map scrolling
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 07-28-2003, 04:27 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 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 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96