Well, if you're looking to trap what they've selected, you can use the selection changed event like so:
Code:
Private Sub MapCtrl_SelectionChange(ByVal sender As Object, ByVal e As AxMapPoint._IMappointCtrlEvents_SelectionChangeEvent) Handles MapCtrl.SelectionChange
If TypeOf (e.pNewSelection) Is MapPoint.Pushpin Then
' A pushpin has been selected, get a reference to it
Dim pin As MapPoint.Pushpin = e.pNewSelection
' Call your method to display the box
Me.DisplayPinDetails(pin)
End If
End Sub
Of course, this will happen on a single-click instead of a double-click. Your other option would probably be to trap the BeforeDoubleClick event, determine the appropriate pushpin, and then run the same detail method.
E.G.
Code:
Private Sub MapCtrl_DblClick(ByVal sender As Object, ByVal e As AxMapPoint._IMappointCtrlEvents_BeforeDblClickEvent) Handles MapCtrl.DoublClick
Dim searchResults As MapPoint.FindResults = Me.ActiveMap.ObjectsFromPoint(e.x, e.y)
Dim pin As MapPoint.Pushpin
For Each result As Object In searchResults
If TypeOf result Is MapPoint.Pushpin Then
pin = result
Exit For
End If
Next
' Call your method to display the box
Me.DisplayPinDetails(pin)
End Sub
Of course, the above code assumes you've only got one pushpin at the selection point. If you want to plan for many pushpins, you'll have to present the user with a list of those to make a selection.
BEWARE: This may cause your app to hang if your "DisplayPinDetails" method takes too long to run (I'm having problems along that line due to OleServer timeouts).
Hope this helps.
MR