VB6 SP6 & OCX 5.1.1, get handle?

Hello,
Since I went to VB6 (to an old huge project), I could not find a way to get shapefile and layer handles:

layerHandle = axMap1.get_LayerHandle
sf = axMap1.get_Shapefile

I need to select some point shapes around the point shape located in the center of the screen, but all examples found on MapWinGIS website are using those methods…

Those two methods are NOT available. Is there a way around ?
Thanks,

Hello @Bob

In VB6, the methods are exposed without the “get_” prefix. Also, for objects like the Shapefile, you need to use the Set method.

It should be

layerHandle = axMap1.LayerHandle(i)    ' where i is the layer position 
Set sf = axMap1.Shapefile(layerHandle) ' and you need to specify which layer

Regards,
Jerry.

Thank you Jerry !
It solved the same issue I had with labels.