DragBehavior property
Returns or sets the action that results from the user dragging the mouse pointer across the map. Read/write GeoDragBehavior.
GeoDragBehavior | Value | Description |
---|---|---|
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. |
Applies to
Objects: Map
Syntax
object.DragBehavior
Parameters
Part | Description |
---|---|
object | Required. An expression that returns a Map object. |
Example
Sub ChangeDragBehavior()
Dim objApp As New MapPoint.Application
'Set up the application
objApp.Visible = True
objApp.UserControl = True
'Change drag behavior to hand so map can be moved (instead of pan)
objApp.ActiveMap.DragBehavior = geoDragHand
End Sub