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 366135
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T13:36:14+00:00 2026-05-12T13:36:14+00:00

We are having to read text off of an existing VB6 application. So we

  • 0

We are having to read text off of an existing VB6 application. So we use the methods FindWindow, GetWindowText, and EnumChildWindows out of kernel32 and can enumerate and read the displayed text in this process.

We are able to read 90% of the text with our method, but there is a specific control (or box) in general that we cannot read.

We cannot target the text we need to read with UI spy-type programs, so I assume they must be rendering it directly to the screen with GDI/GDI+. They cannot be using a control or window to render the text we need.

Is there a way to determine how they are rendering the text, and possibly read it?

We do not want to grab the hDC of the window and render it onto a bitmap and somehow reverse-CAPTCHA the text… that could be a nightmare.

SOLUTION: We discovered it is possible for use to merely look for 2-3 phrases in this box versus actually OCR-ing the text. So we are going to render it to a bitmap and compare it with 2-3 pre-stored bitmaps so we can merely compare pixel by pixel.

Top answer brought us to this solution.

  • 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-05-12T13:36:14+00:00Added an answer on May 12, 2026 at 1:36 pm

    If they’re drawing direct to a surface, there’s no way to get the text without some weird OCR stuff.

    Update: after thinking about your problem, I think that doing what you describe (grabbing the window’s hDC and creating a bitmap from it) would be a relatively easy task (relative to trying to intercept the API calls that were rendering the text in the first place).

    It wouldn’t be as difficult as doing OCR on handwriting, for example. As long as you can determine the font used by the Visual Basic 6 application to draw the text, and as long as the text you want to scrape is drawn to the same location on the form each time, it would be relatively easy to break the drawn text up into discrete characters (as tiny little bitmaps) and then compare each one to a pre-generated collection of characters that you’ve drawn with the same font at the same size. The characters would match perfectly on a pixel-by-pixel basis.

    There might be a problem if the program runs on different systems and draws the text with different fonts.

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

Sidebar

Related Questions

I am trying to use regex to parse out some lines from text read
I am having trouble passing data read from a text file to another class
I have a .txt file having some text. I want to read this file
I remember having read this in Apple's documentation but now I can't find it.
I have been able to write a program that can read any text files...
I am having a weird problem. I read a text file then I split
I'm having a bit of a strange issue that I can't quite figure out.
Having read a couple of the questions asked relating to this, I can get
Having read this article and many others out there on how to not store
Read in text books that there are mainly two file access methods; sequential and

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.