Share via


ReadyStateChange event

This event occurs when the state of the MapPoint Control has changed. When it fires, check the ReadyState property of the MappointControl object to ascertain the readiness state of the control.

Applies to

Objects: MappointControl

Syntax

object.ReadyStateChange

Part

Description

object

An expression that evaluates to a MappointControl object.

Remarks

  • Do not make this event infinitely recursive by calling itself or causing itself to be called.

Example

  'This sample needs the MapPoint Control
  'and a list box added to the form

  Private Sub Form_Load()
    MappointControl1.NewMap geoMapNorthAmerica
  End Sub

  Private Sub MappointControl1_ReadyStateChange()
    Dim strNewState As String

    Select Case MappointControl1.ReadyState
      Case READYSTATE_COMPLETE
        strNewState = "Complete"
      Case READYSTATE_INTERACTIVE
        strNewState = "Interactive"
      Case READYSTATE_LOADED
        strNewState = "Loaded"
      Case READYSTATE_LOADING
        strNewState = "Loading"
      Case READYSTATE_UNINITIALIZED
        strNewState = "Uninitialized"
    End Select
    List1.AddItem "Ready state changed: " & strNewState
  End Sub