Example MarkPoints in VB.NET Problem

Hello
I try to run this code en VB.net , but i can’t change this lines, somebody can help me please?

And, this is correct? = false

If (sf.EditInsertShape(shp, ref Index) = False)

regards Luis.

Hello @Luis

Firstly, VB.net does not add event handlers as c# does. The handler setup should be something like:

AddHandler AxMap1.MouseDownEvent, AddressOf AxMap1_MouseDownEvent

Secondly, VB.net does not use the ‘ref’ keyword for reference parameters. It looks like the three lines to change are the following:

AxMap1.PixelToProj(e.x, e.y, x, y)
...
shp.InsertPoint(pnt, Index)
...
If (sf.EditInsertShape(shp, Index) = False) Then
...

And just as a side-note, you don’t have to initialize Index before calling the various Insert commands. It will automatically assign the next available index.

Regards.
Jerry

This topic was automatically closed 6 days after the last reply. New replies are no longer allowed.