Hello again,
I use the follwing (vba) code to display a shapelayer with labels. Nearly everything works so far, only the Line where I want to set the symbol size crashes the application. (This code is imported from MapWinGis.ocx 4.8.8):
I use the follwing (vba) code to display a shapelayer with labels. Nearly everything works so far, only the Line where I want to set the symbol size crashes the application. (This code is imported from MapWinGis.ocx 4.8.8):
' Zweiten Layer
Set objText = New MapWinGIS.Shapefile
If objText.Open(Application.CurrentProject.Path & "\texte.shp") = True Then
objText.Labels.FontName = "Arial"
objText.Labels.FontSize = 6
objText.Labels.FrameTransparency = 1
' Shape-Objekt durchlaufen
For i = 0 To objText.NumShapes - 1
' Label-Text ermitteln
strLabel = CStr(objText.CellValue(6, i))
' Label-Koordinaten ermitteln
dblX = objText.Shape(i).Point(0).x
dblY = objText.Shape(i).Point(0).y
objText.Labels.AddLabel strLabel, dblX, dblY
Next i
lnglayerhandle = Me.mapMain.AddLayer(objText, True)
' the next line crashes the app
Me.mapMain.ShapeLayerPointSize(lnglayerhandle) = 1
End If
Can anybody help?