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

How to programmatically draw a rectangular focus box?

This is a discussion on How to programmatically draw a rectangular focus box? within the MapPoint Desktop Discussion forums, part of the Map Forums category; When the user click on the map and drag/move the mouse, I want to draw a rectangular focus box to ...

  1. #1
    Alex Chow is offline Junior Member White Belt
    Join Date
    Dec 2003
    Posts
    6

    How to programmatically draw a rectangular focus box?

    When the user click on the map and drag/move the mouse, I want to draw a rectangular focus box to indicate the region in the map that he is selecting.

    This works in the Mappoint Application when you click and move mouse.

    How do you do this programmatically in the your own VB application using the Mappoint OCX control?

    Thanks.

    Alex

  2. #2
    Eric Frost's Avatar
    Eric Frost is offline Administrator Black Belt
    Join Date
    Jul 1992
    Posts
    5,094
    Blog Entries
    4
    Alex,

    I think you should be able to trigger it -- see the Extending the ActiveX control articles.

    good luck,
    Eric
    ~ Order MapPoint MapPoint 2013 Here and Get Free Access to the MapForums Downloads ~
    ~~
    ~ Upgrade to Get Access to the MapForums Downloads ~

  3. #3
    Mossoft is offline Member Yellow Belt
    Join Date
    Feb 2003
    Posts
    48
    MappointControl1.ActiveMap.DragBehavior = geoDragBox

    M.

    Hmmmm Seems too simple. Have I missed the point??

  4. #4
    Eric Frost's Avatar
    Eric Frost is offline Administrator Black Belt
    Join Date
    Jul 1992
    Posts
    5,094
    Blog Entries
    4
    Ah yeah. I haven't used that before From the help file:

    DragBehavior property
    Returns or sets the action that results from the user dragging the mouse pointer across the map. Read/write GeoDragBehavior.

    geoDragBox - 2
    Creates a rectangular selection area on the map

    geoDragHand - 1
    Shifts the map

    geoDragNone - 0
    No action

    geoDragOther - 3
    If a drawing tool is selected, a shape is drawn on the map; if the Measure Distance tool is selected, distance is measured on the map; if the Location Sensor tool is selected, latitude and longitude coordinates are displayed on the map; if the mouse is near the edge of the map, the map view rotates. This value can only be returned, not set.

    Eric
    ~ Order MapPoint MapPoint 2013 Here and Get Free Access to the MapForums Downloads ~
    ~~
    ~ Upgrade to Get Access to the MapForums Downloads ~

  5. #5
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137
    Thanks for the help guys.

  6. #6
    Mossoft is offline Member Yellow Belt
    Join Date
    Feb 2003
    Posts
    48
    You may also want to check out the SelectedArea object.

    objMap.SelectedArea.SelectArea 20, 40, 100, 150
    objMap.SelectedArea.Location.GoTo


    M.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. to draw my own map
    By rushang in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 01-23-2005, 11:55 PM
  2. How to change the pushpin programmatically ?
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 4
    Last Post: 12-21-2004, 05:50 AM
  3. Delphi/Mappoint - Modal Form looses Focus & sent to back
    By PinnacleDev in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 12-06-2004, 11:35 AM
  4. Reading Territories name Programmatically using VB
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 05-20-2003, 09:20 AM
  5. How to avoid mapppoint control focus when pressing a Key
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 8
    Last Post: 01-13-2003, 07:45 PM

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