MapWinGIS:GlobalCallback
From MapWindow GIS
GlobalCallback
The global callback is the interface used by MapWinGIS to pass progress and error events to interested applications.
VB.NET Usage
Property GlobalCallback() As Object
Parameters
|
ReturnValue | The global callback used by MapWinGIS to pass progress and errors. |
Sample Code
Public Class Form1
Inherits System.Windows.Forms.Form
'To use the MapWinGIS callback to receive errors and messages, you must implement the MapWinGIS.ICallback interface
Implements MapWinGIS.ICallback
'...
#Region "ICallback Members"
Public Sub myError(ByVal KeyOfSender As String, ByVal ErrorMsg As String) Implements MapWinGIS.ICallback.Error
'Display the error message in a label
LabelError.Text = ErrorMsg
End Sub
Public Sub Progress(ByVal KeyOfSender As String, ByVal Percent As Integer, ByVal Message As String) Implements MapWinGIS.ICallback.Progress
'Display the progress in a label
Label1.Text = "Progress: " + Str(Percent) + "%"
'Display the message in a label
Label2.Text = Message
End Sub
#End Region
'...
VB 6 Usage
Property GlobalCallback() As Object
Parameters
|
ReturnValue | The global callback used by MapWinGIS to pass progress and errors. |
Sample Code
'In order to recieve MapWinGIS progress and error callback messages, you must implement the ICallback interface
Implements ICallback
'...
Private Sub ICallback_Error(ByVal KeyOfSender As String, ByVal ErrorMsg As String)
'Display the error message in a text box
TextError = ErrorMsg
End Sub
Private Sub ICallback_Progress(ByVal KeyOfSender As String, ByVal Percent As Long, ByVal Message As String)
'Display the progress in a text box
Text1.text = "Progress: " + Str(Percent) + "%"
'Display the message in a text box
Text2.text = Message
End Sub
'...
















