This example demonstrates how the StopOCR method can be invoked via a Cancel button. This might be the code behind the command button on a user-defined progress dialog.
Note: The standard OCR progress dialog is presented when the ProgressNotification property is set to TRUE.)
Private Sub cmdCancelOCR_Click()
'Stop the OCr process and close the progress dialog
Imgocr1.StopOcr
Unload frmProgress
End Sub