Closed BrendanM-RSA closed 4 years ago
Hello @BrendanM-RSA
I'm sorry but I'm not able to reproduce this, coded exactly as you have.
Here's a screen shot after stepping past the Map1.Extents setting. I'm able to query both the Shapefile extents and the Map extents (don't ask me why they differ - may have something to do with a buffer).
So at the moment, I'm not sure what to think. Can you try some other operations? Maybe we can get more clues.
Runing VB6 SP6
Map was added to toolbox and then to the form as you said.
sf1 no properties - at your breakpoint at End Sub if you add a Watch to sf1 - then I get no properties listed. As per my original screen grab
Only thing that I can think of is that this PC had the old MapWinGIS on it. I initially ran the 5.0.1 installer on top of it. When I saw the errors I uninstalled 5.0.1 (which cleared c:\dev) and manually cleaned the registry of all MapWinGIS entries. Then re-installed 5.0.1
The map1 object onb my form is shwoing its verison as 5.0.1 so I am happy it has found the OCX
Here is my VB6 project Proj.zip
Re-open
Same or similar Problem here, after update from 4.9.3 but different errormessage: De-/installation and cleaning registry with no success. What to do further.
VB6 SP6 Windows 10 PRO (1703)
Sorry, the "SET" Instruction was wrong, now same errormessage: No problems with 4.9.5!
If you have a MapWinGIS ShapeFile in VB6 can you see the runtime properties of it when you create a Watch for it in the IDE?
The extents object shows no properties (xmin,ymin,.....) when creating a watch!
Without doing a test we can probably surmise that in the VB6 runtime IDE no object properties can be viewed in the Watch window
Hello @BrendanM-RSA , @frank2x460 ,
I'm not sure what's going on. We have an older app that first moved to MapWinGIS at 4.9.x. I've recently updated to 5.0.1, still with no problem. Here's a screenshot just after assigning the Extents. It does appear that the Watch window, at least the the Extents, is worthless. At any rate, we'll have to try to figure out what's different... One thing that comes to mind is that I build MapWinGIS on this machine from the source code (I didn't run the installer). The COM registration should be identical. I'll see if I can find a machine that has VB6 that I can run the installer on, to see if that makes the difference...
Regards, Jerry.
If this is still an issue with the latest release (https://github.com/MapWindow/MapWinGIS/releases) could you create a new issue? For now, I close this old issue.
I have been using MapWinGIS for a number of years with Vb6. Decided to upgrade to 5.0.1. On one of my more simpler projects the new MapWinGIS seesm to work but nit 100%.
There are some issues
To Reproduce Create a VB6 project, blank form with Map1 on it. Form code as below:
Private sf1 As New MapWinGIS.Shapefile Private Sub Form_Load() ' sf1 does not show any properties in the VB6 IDE Call sf1.CreateNewWithShapeID("", SHP_POLYGON) Call Map1.AddLayer(sf1, True)
' this crashes 'Map1.Extents = sf1.Extents End Sub
Issues
In the IDE if you have a breakpoint on the End Sub then sf1 has no properties. Screen grab atatched
Accessing sf1.extents crashes. Screen grab attached
Desktop (please complete the following information):