View Single Post

  #3 (permalink)  
Old 10-15-2004
Anonymous Anonymous is offline
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
to match a place when the mouse move

try this

Dim objResults As MapPoint.FindResults
Dim objResult As Object
Dim i As Integer

Set objResults = objMap.ObjectsFromPoint(X, Y)

If objResults.Count > 1 Then
For i = 2 To objResults.Count
Set objResult = objResults.Item(i)
If objResult.Type = 12 Then
strCP = objResult.Name
lblCP = objResult.Name
ElseIf objResult.Type = 16 Then
lblCommune = objResult.Name
End If
Next i
end if

I use it in a beforclick event to disply the postal code and the county name (Commune) on a labels on a form (12 and 16 types)
It's working fine but.. when the cursor pass on thematic map. th findResults collection seems to "change" in her behavior.. so the "type" property is NOT allowed. An error ocurred. For me the model object of Mappoint is lacking of consistency .
Anyone as a solution?
Reply With Quote