AnnChange example for Visual Basic

'Please note the following:
'LEADRasterView1 refers to a LEADRasterView control
'Global declarations
Private WithEvents RasterAnn As LEADRasterAnnotation
Private RasterAnnToolbar As LEADRasterAnnToolBar

'In the Form_Load method:
Set RasterAnn = New LEADRasterAnnotation
Set RasterAnnToolbar = New LEADRasterAnnToolBar
RasterAnn.AnnParentRasterView = LEADRasterView1

'This example tests the AnnChange event.
Private Sub RasterAnn_OnAnnChange(ByVal hAnnObject As Long)
   Dim Buffer As String
   Dim nTag As Long
   RasterAnn.AnnGetTag hAnnObject
   nTag = RasterAnn.AnnTag
   Buffer = " This is a change for the button tagged " + CStr(nTag)
   MsgBox Buffer, 0, "NOTE"
End Sub