StartUP Example for Visual Basic
Dim WithEvents RasterDoc As LEADRasterDocument
Private Sub Command37_Click()
Dim nRet As Integer
Set RasterDoc = New LEADRasterDocument
' Unlock OCR support.
' Note that this is a sample key, which will not work in your toolkit.
LEADRasterView1.Raster.UnlockSupport L_SUPPORT_OCR, "TestKey"
nRet = RasterDoc.StartUp
If (nRet = 0) Then
RasterDoc.EnableMethodErrors = False
RasterDoc.LoadSettingsFile "c:\OCRsetting.set"
If RasterDoc.PageFillMethod <> FM_HANDPRINT Then
RasterDoc.PageFillMethod = FM_HANDPRINT
End If
nRet = RasterDoc.SaveSettingsFile ("c:\OCRsetting.set")
If nRet = 0 Then
MsgBox "The engine saved the updated settings to a file"
Else
MsgBox "The engine couldn't save the updated settings to a file"
End If
RasterDoc.ShutDown
End If
Set RasterDoc = Nothing
End Sub