AnnUndoEnable 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 sets the annotation undo depth to 10 and
'enables the annotation undo capability
Private Sub AnnUndoEnable_Click()
RasterAnn.AnnUndoEnable = True
RasterAnn.AnnUndoDepth = 10
End Sub