MapPoint Forums

MapForums

Community of MapPoint and Virtual Earth Users and Developers




How to programmatically draw a rectangular focus box?

This is a discussion on How to programmatically draw a rectangular focus box? within the MapPoint 2006/2009 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 ...


Go Back   MapPoint Forums > Map Forums > MapPoint 2006/2009 Discussion

Today's Posts Twitter Feed Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read



Click here to register

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-04-2003
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
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 12-05-2003
Eric Frost's Avatar
Senior Member
Black Belt
 
Join Date: Jul 1992
Posts: 3,041
Blog Entries: 2
Alex,

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

good luck,
Eric
__________________
~ Now taking orders for MapPoint 2009 ~
~~
~ Upgrade to MapForums Plus membership ~
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 12-09-2003
Member
Yellow Belt
 
Join Date: Feb 2003
Posts: 48
MappointControl1.ActiveMap.DragBehavior = geoDragBox

M.

Hmmmm Seems too simple. Have I missed the point??
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 12-09-2003
Eric Frost's Avatar
Senior Member
Black Belt
 
Join Date: Jul 1992
Posts: 3,041
Blog Entries: 2
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
__________________
~ Now taking orders for MapPoint 2009 ~
~~
~ Upgrade to MapForums Plus membership ~
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 12-09-2003
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
Thanks for the help guys.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6 (permalink)  
Old 12-12-2003
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.
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
box, draw, focus, programmatically, rectangular


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
to draw my own map rushang MapPoint 2006/2009 Discussion 0 01-23-2005 10:55 PM
How to change the pushpin programmatically ? Anonymous MapPoint 2006/2009 Discussion 4 12-21-2004 04:50 AM
Delphi/Mappoint - Modal Form looses Focus & sent to back PinnacleDev MapPoint 2006/2009 Discussion 2 12-06-2004 10:35 AM
Reading Territories name Programmatically using VB Anonymous MapPoint 2006/2009 Discussion 2 05-20-2003 08:20 AM
How to avoid mapppoint control focus when pressing a Key Anonymous MapPoint 2006/2009 Discussion 8 01-13-2003 06:45 PM


All times are GMT -5. The time now is 04:08 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0 RC2
MP2K Magazine
Visitor Map

Algarve Holiday
Portuguese all year round sunshine is some of what awaits you if you choose the Algarve holiday option through UlookUbook!



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