BeforeDblClick event
Occurs after the user double-clicks on the map but before MapPoint has processed the action.
Applies to
Objects: Map, MappointControl
Syntax
object.BeforeDblClick(Button, Shift, X, Y, Cancel)
Parameters
Part | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
object | An expression that evaluates to a Map or MappointControl object. | ||||||||||||||||||||||||
Button | ByVal Long. An integer that corresponds to the state of the mouse buttons. A bit is set if the button is down. The Button argument is a bit field with bits corresponding to:
Indicates the state of the mouse buttons: one, some, or all of these five bits can be set, indicating that one, some, or all of the buttons are pressed. |
||||||||||||||||||||||||
Shift | ByVal Long. An integer that corresponds to the state of the SHIFT, CTRL, and ALT keys. A bit is set if the key is down. The Shift argument is a bit field with the least-significant bits corresponding to:
Indicates the state of these keys: some, all, or none of the bits can be set, indicating that some, all, or none of the keys are pressed. For example, if both CTRL and ALT were pressed, the value of Shift would be 6. |
||||||||||||||||||||||||
X | ByVal Long. The X coordinate of the mouse pointer relative to the map window, in pixels. | ||||||||||||||||||||||||
Y | ByVal Long. The Y coordinate of the mouse pointer relative to the map window, in pixels. | ||||||||||||||||||||||||
Cancel | Boolean. False when the event occurs. If the event procedure sets this argument to True, the double-click is ignored. |
Remarks
Do not make this event infinitely recursive by calling itself or causing itself to be called.
Do not create a modal dialog box—including message boxes—during this event.
Example
Dim WithEvents objApp As MapPoint.Application
Dim WithEvents objMap As MapPoint.Map
Private Sub Form_Load()
'Set up the application
Set objApp = CreateObject("mappoint.application")
Set objMap = objApp.ActiveMap
objApp.Visible = True
objApp.UserControl = True
End Sub
Private Sub objMap_BeforeDblClick(ByVal Button As Long, ByVal Shift As Long, ByVal X As Long, ByVal Y As Long, Cancel As Boolean)
Dim objResults As MapPoint.FindResults
Dim objResult As Object
'Display the name of each object where user double-clicks on map
Set objResults = objMap.ObjectsFromPoint(X, Y)
For Each objResult In objResults
MsgBox objResult.Name
Next
End Sub