Hello,
I am trying to select the points in side of the cmselection box but nothing gets selected. I get values returned when i debug.print left, right, bottom and top, but I suspect the problem is that I need to convert these values? Here is my code:
Private Sub Map0_SelectBoxFinal(ByVal left As Long, ByVal right As Long, ByVal bottom As Long, ByVal top As Long)
Dim gs As New MapWinGIS.GlobalSettings
gs.AllowProjectionMismatch = True
Me.Map0.SendSelectBoxFinal = True
Dim sf As New MapWinGIS.Shapefile
Dim ext As New MapWinGIS.Extents
Dim lh As Integer
Dim xmin As Double
Dim ymin As Double
Dim zmin As Double
Dim xmax As Double
Dim ymax As Double
Dim zmax As Double
Dim i As Long
Dim results As Object
With Me.Map0
xmin = left
ymin = bottom
zmin = 0#
xmax = right
ymax = top
zmax = 0#
ext.SetBounds xmin, ymin, zmin, xmax, ymax, zmax
lh = Me.Map0.LayerHandle(0)
sf.StartEditingShapes (True)
sf.SelectShapes ext, 0#, SelectMode.INTERSECTION, results
For i = 0 To 100
sf.ShapeSelected(i) = True
Next
Debug.Print sf.NumShapes
End With
End Sub