Available in LEADTOOLS Document and Medical Imaging toolkits.
AnnUndoDepth example for Visual Basic
' This example increases the length of the undo stack
LEAD1.AnnUndoDepth = LEAD1.AnnUndoDepth + 5