Top |
Post New Question |
Read All |
MP2K Asks Microsoft
787
ketan parekh
-
July 15, 2002
Hi
I have a problem. When i draw a line and then select it, a box appears on
the start and the end of the line. I do not want that boxes to appear when
the user selects the line. I nknow that is for the user to know that he/she
has selected that line, but i do not need that.
Please help.
Answer:
July 16, 2002
One way to do that is to use the BeforeClick evenement and then to cancel the click. It looks like that:
Private Sub ..._BeforeClick(ByVal Button As Long, ByVal Y As Long, Cancel As Boolean)
On Error GoTo errBeforeClick
Dim oResults As MapPoint.FindResults
Dim oResult As Object
If Button = 1 Then
Set oResults = gMap.ObjectsFromPoint(X, Y)
For Each oResult In oResults
If TypeOf oResult Is MapPoint.Shape Then
Cancel = True
Exit Sub
End If
Next
End If
Exit Sub
errBeforeClick:
Err.Clear
Cancel = True
Exit Sub
End Sub
Not really pretty but it works!
Doud
Post New Answer / Follow-up