MapWindow Home
Search MapWindow.org


  • Home
    • Download
    • Why MW
    • FAQ
    • Contact
  • Products
    • MapWindow
    • ActiveX
    • Plug-ins
  • Software Dev
    • Sample Code
    • Scripts
    • Source
    • Bugs
    • Support
    • Languages
  • Site Tools
    • Forums
    • Tutorials
    • Mailing Lists
    • Team
    • Site Stats
    • Links
  • Get Stuff
    • Buy a CD
    • Buy a T-Shirt
    • MW Book
    • ActiveX Book
    • Donate
    • Buy Support
  • Documentation
    • MWGIS App. User Guide
    • GISTools User Guide
    • MW Plug-ins Dev. Guide
    • MWGIS ActiveX Dev. Guide
    • MWGeoProc Dev. Guide

MapWinGIS:GlobalCallback

From MapWindow GIS

Jump to: navigation, search

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
        '...

Retrieved from "http://www.mapwindow.org/wiki/index.php/MapWinGIS:GlobalCallback"
Views
  • Page
  • Discussion
  • View source
  • History
Personal tools
  • Log in / create account
  • What links here
  • Related changes
  • Upload file
  • Special pages
  • Printable version
  • Permanent link

Geospatial Software Lab

Copyright © 2008 - MapWindow Open Source Team
( last updated: November 12 2008.)
Home | Donate | Download | MapWindow GIS Desktop | MapWinGIS.ocx | Plug-ins | Contact | Lists | Bugs | Sample Code | Documentation
Code Repository | Open Source License | Discussion Forum | Wiki | Join the Team | Site Statistics | Links