Verification Dialog in vb.net

  • 2K Views
  • Last Post 02 October 2014
julius posted this 17 September 2014

can someone help me, how to using verificationdialog using vb.net (i am a newbie in both vb.net and C#) ?

using online converter tool to convert from the sample project (visual components - hello with flexicapture project(C#) to vb.net

---------------------verificationdialog.vb ' © ABBYY. 2011. ' SAMPLES code is property of ABBYY, exclusive rights are reserved. ' DEVELOPER is allowed to incorporate SAMPLES into his own APPLICATION and modify it ' under the terms of License Agreement between ABBYY and DEVELOPER.

' Product: ABBYY FlexiCapture Engine 9.0

Imports System.Collections.Generic Imports System.ComponentModel Imports System.Data Imports System.Drawing Imports System.Text Imports System.Windows.Forms

Imports FCEngine

Namespace Sample Public Partial Class VerificationDialog Inherits Form Private batch As IBatch

    Public Sub New(engine As IEngine, _batch As IBatch)
        InitializeComponent()

        ' Initialize VerificationView component
        verificationView.Engine = engine
        batch = _batch
    End Sub

    Private Sub VerificationDialog_Load(sender As Object, e As EventArgs)
        Try
            ' We will automatically start verification on load
            verificationView.StartVerification(batch, Nothing)
        Catch ex As Exception
            ' This method will fail if verification is not allowed by license
            MessageBox.Show(ex.Message)
            Close()
        End Try
    End Sub

    Private Sub verificationView_VerificationCompleted(sender As Object, e As FCEngine.VisualComponents.VerificationCompletedEventArgs)
        ' And close the form when verification is complete
        Close()
    End Sub

    Private Sub cleanUp()
        ' This method is called from Dispose for proper cleanup. See VerificationDialog.Designer.cs

        ' !!! Do not forget to propely clean up after verification.
        ' During verification a lot of documents can be opened which need to be closed in timely manner.
        verificationView.Dispose()
    End Sub
End Class

End Namespace

-------------------- main form with verify button Private Sub verifyButton_Click(sender As Object, e As EventArgs) Using dialog As New VerificationDialog(engine, batch) dialog.ShowDialog() End Using End Sub


the error message : the verifybutton event on click fail with message too many arguments to public sub new()

rgds

Julius

SDK_support posted this 02 October 2014

Please, provide us with the following additional data to help us investigate the issue: 1. Your product serial number; 2. Entire project in vb.net 3. Image you process when getting an exception; 4. Screenshot of error message (exception message), you receive.

You could send this information to our e-mail SDK_Support@abbyy.com.

Close