View Single Post

  #3 (permalink)  
Old 07-02-2004
jdwhytie jdwhytie is offline
Member
Yellow Belt
 
Join Date: Jun 2004
Posts: 37
I tried out this code, it adds a pushpin to the map (objMap) when you click the left and right mouse buttons together (all you have to do is change the Button value to switch)

Code:
  Private Sub objMap_BeforeClick(ByVal Button As Long, ByVal Shift As Long, ByVal X As Long, ByVal Y As Long, Cancel As Boolean)
    If Button = 3 Then
       Dim pinLoc As Mappoint.Location
       Set pinLoc = objMap.XYToLocation(X, Y)
       objMap.AddPushpin pinLoc, "great"
       pinLoc.goto
    End If
  End Sub
Hope this helps you
Reply With Quote