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 3 of 3

Switch between pan and zoom programmatically

This is a discussion on Switch between pan and zoom programmatically within the MapPoint Desktop Discussion forums, part of the Map Forums category; I'm developing an application which uses MapPoint activex control. I don't want any toolbars in the mappoint control so I've ...

  1. #1
    masty is offline Junior Member White Belt
    Join Date
    Sep 2006
    Posts
    6

    Switch between pan and zoom programmatically

    I'm developing an application which uses MapPoint activex control.
    I don't want any toolbars in the mappoint control so I've disabled them, anyway when I'm over the control with the mouse I would like to pan at the same way I do when I select the Pan instrument in the Navigation Toolbar. I would like also to use the function zoom area as I can do when the zoom instrument in the navigation toolbar is selected. I should switch between these two functionality (zoom and pan) through buttons which are outside of the MapPoint control... so the question is..
    can I switch programmatically between the PAN instrument and the ZOOM instrument?

    Thanks in advance for anyone can give me help.
    masty

  2. #2
    jlewis is offline Member Yellow Belt
    Join Date
    Apr 2006
    Posts
    33
    Hi masty,

    You can use the DragBehavior property to switch between pan and zoom.

    So, assuming your control is called mapCtl use

    mapCtl.ActiveMap.DragBehavior = MapPoint.GeoDragBehavior.geoDragHand (for pan)

    and

    mapCtl.ActiveMap.DragBehavior = MapPoint.GeoDragBehavior.geoDragBox (for zoom)

    Hope this helps...
    John Lewis

  3. #3
    masty is offline Junior Member White Belt
    Join Date
    Sep 2006
    Posts
    6
    OK! It works perfectly.

    Thanks a lot jlewis!

    bye!

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. How fast can one switch from Mappoint to Mappoint Webservice
    By Wilfried in forum Bing Maps and MapPoint Web Service
    Replies: 2
    Last Post: 01-13-2009, 01:46 PM
  2. Switch-To, Application Busy Error with VB.NET
    By mrobold in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 12-29-2003, 05:40 PM
  3. Zoom In and Zoom Out event detection
    By victorf in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 10-22-2003, 01:56 AM
  4. How can I switch from Mappoint2002 Europe to America C++
    By cpinatel in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 06-16-2003, 04:56 AM
  5. Is there a way to programatically switch the mouse....
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 07-19-2002, 10:14 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