Vb.net callback example?

#1

Do you have a vb.net callback example?

0 Likes

#2

Hello @jonwinchester

At the Form level, you could do something like the following:

Public Class Form1
    Implements MapWinGIS.ICallback

    ' Error callback
    Public Sub [Error](KeyOfSender As String, ErrorMsg As String) Implements ICallback.Error
        ' do something
    End Sub

    ' Progress callback
    Public Sub Progress(KeyOfSender As String, Percent As Integer, Message As String) Implements ICallback.Progress
        ' do something
    End Sub

    ' here's an example when editing a Shapefile...
    ' (assuming that m_LayerHandle is already assigned to a valid layer)
    Dim sf As Shapefile = AxMap1.get_Shapefile(m_LayerHandle)
    ' just hand in 'Me' for the callback reference
    If sf.StartEditingShapes(True, Me) Then

    End If

End Class

Regards,
Jerry.

0 Likes

#3

Perfect. Thank you very much!

0 Likes

closed #4
0 Likes