Get PushPin

Anonymous
03-03-2005, 08:10 AM
how can I get PushPin Id from mousedown event?

Anonymous
03-03-2005, 10:16 AM
Hi,

To get the selected pushpin Name, you have this example in MapPoint Help



Private Sub Form_Load()
'Configure l'application
Set objApp = CreateObject("mappoint.application")
Set objMap = objApp.ActiveMap
objApp.Visible = True
objApp.UserControl = True
End Sub

Private Sub objMap_MouseDown(ByVal Button As Long, ByVal Shift As Long, ByVal X As Long, ByVal Y As Long)

Dim objApp As New MapPoint.Application
Dim objMap As MapPoint.Map
Dim objPin As MapPoint.Pushpin

Set objMap = objApp.ActiveMap
objApp.Visible = True
objApp.UserControl = True


Set objPin = objMap.Selection

If TypeOf objMap.Selection Is Pushpin Then
MsgBox ObjPin.Name
Else
MsgBox "No selection!"
End If

End Sub





I hope it's what you are looking for!!

Mohamed

 
Web mp2kmag.com
mapforums.com