Here is my code(realy simple)

Public Class Form1

    Dim WithEvents teseract As tessnet2.Tesseract

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
        OpenFileDialog1.ShowDialog()
        TextBox1.Text = OpenFileDialog1.FileName
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button1.Click
        teseract = New tessnet2.Tesseract
        teseract.SetRootPath("C:\", "eng")
        teseract.Init("eng", False)
        Dim b As Bitmap = New Bitmap(TextBox1.Text)
        'Dim list As List(Of tessnet2.Word)

        teseract.OcrDone = New tessnet2.Tesseract.OcrDoneHandler
(AddressOf done)


        'list = teseract.doOCR(b, New Rectangle(0, 0, b.Width,
b.Height))
    End Sub
    Private Sub done(ByVal words As List(Of tessnet2.Word))
        Dim word As tessnet2.Word
        For Each word In words
            ListBox1.Items.Add(word.Text)
        Next
    End Sub

    Private Sub teseract_ProgressEvent(ByVal percent As Integer)
Handles teseract.ProgressEvent
        ProgressBar1.Value = percent
    End Sub
End Class

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"tesseract-ocr" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/tesseract-ocr?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to