Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7814223
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T05:08:01+00:00 2026-06-02T05:08:01+00:00

I have the current code: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As

  • 0

I have the current code:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    Dim Bitmap As New Bitmap("image.png")
    Dim ocr As tessnet2.Tesseract = New tessnet2.Tesseract()
    ocr.SetVariable("tessedit_char_whitelit", "0123456789")
    ocr.Init("c:\", "fra", False)
    Dim result As List(Of tessnet2.Word) = ocr.DoOCR(Bitmap, Rectangle.Empty)
    For Each word As tessnet2.Word In result
        RichTextBox1.Text &= word.Text & "(" & word.Confidence & ") "
    Next
End Sub

I just have a normal RichTextBox and a button on the form. I also have an image in the debug directory called “image.png”.

Every time I run this, the program just closes. I did a step through and all of a sudden a file locater came up asking for “tessnet2.cpp”

I have a reference to the dll. I also don’t know what the ocr.Init(…) line is for.

Any help would be nice!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T05:08:03+00:00Added an answer on June 2, 2026 at 5:08 am

    First of all, thank you very much for your simple but effective code. After 3 days search I found this code for VB (not VC). Of course I copied and pasted it immediately and the same problem occured for me, too. Then:

    1. I uninstalled Tesseract 3.xx
    2. Checked RegEdit for Tesseract 3.xx and deleted them (whoever want to do this step; please be careful not to destroy anything)
    3. Copied tessdll.dll in the same folder.

    4. The main problem is:
      ocr.Init("c:\", "fra", False) it should be something like this:
      ocr.Init("c:\tessdata", "fra", False) in fact my real line is:
      ocr.Init(Application.StartupPath & "\tessdata", "eng", False)

    5. Noticed that in the folder “…\Visual Studio 2008\Projects….” I still had the same problem and then copied all folder in “D:\Test” folder (of course in this folder I have one more folder: tessdata)

    It worked!!!

    Hope it helps for you or anyone searching for this problem like me 🙂

    Nes

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following code: Private Sub btnReserve_Click(ByVal sender As Object, ByVal e As
I have a code sample that gets a SEL from the current object, SEL
I have this code: Dim pathString As String = HttpContext.Current.Request.MapPath(Banking.mdb) Dim odbconBanking As New
I have the current code: Public Declare Function FindWindow Lib user32.dll Alias FindWindowA (ByVal
Here's the current code I have got private void recalculateRRange(Excel.Range UsedRange) { Excel.Range currentRRange
As a beginner in Ocaml, I have this current working code: ... let ch_in
I have my current google maps code working to the point where if I
I am having a bit of difficulty with this current code I have set
I have some code that gets the current logged in user. userID = request.session.get(_auth_user_id)
I have following code return (EseshEntities.Current.Users.Select(u => new { Comunity = u.Apartment.Building.District.City })).ToList(); if

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.