Interfacing different software using VB6.0


Does anyone know if its possible to interface OCR and Text to voice software using VB.
I'd like to use availabe OCR and Text to voice software without having to open and start them separately
e.g. scan text using OCR then text is read back automatically using text to voice software.

I'd like to achieve this in one operation, without having to constantly be clicking icons on screen etc.

Is this possible??!!!
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Do your chosen OCR and text-to-voice packages an API each? Or even better, do they have a COM interface? If not you might be able to use Shell or CreateProcess(), but it'll be a bit messy.
There are many OCR ActiveX controls and DLL's available out there.  One of the leading companies (IMHO) is LeadTools.  Here is a link to their OCR software OCX:

Microsoft themselves provide text to speech controls and SDK's.  One being as simply using MS Agent or more sophisticated such as ;  or

Hope this helps some.  It sure seems possible from within VB itself using seperate OCX and DLL's.  I honestly have not used any OCR but have played with MS Agent and it is extremely simple to use.

Good luck!

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

ReachtabhairAuthor Commented:
Could you go a bit more into detail about  'Shell' or 'CreateProcess()' 'OCX and DLL's'???

I really dont think I can afford to actually buy one of these commercially available OCR software packages as they are way outside my budjet!!

How could I interface the OCR and text to voice software without having access to the source code
Shell is a VB function. Details are in the VB Help.

e.g. Shell "MyProg.exe"
The Microsoft Speech SDK (software development kit) is free.
OCX is the extension of files which contain components which can be added to VB programs
ReachtabhairAuthor Commented:
Is it possible to interface the OCR and text to voice software without having access to the source code?
What would be easier having the source code or not.

To use a windows API, you need to declare the function and the library (DLL) that it is in. Chances are that the OCR and Speech executables rely on DLL's. The will have function calls as well, but the software provider is unlikely to tell you what they are and how to use them. However, if you do know the names of the package providers, they may provide an SDK (as with Microsoft Speech)which will give that information.
Good morning all.

To expand on what GrahamSkan had mentioned, the majority of OCX controls after installation will reside under Project -> Components (similar to adding Microsoft's Internet controls).  Then you would drag this OCX onto your form to expose the methods and properties.  Some companies provide examples and source code.

As for your question how to interface with the OCX, just like how the Textbox control exposes .Text and .BorderStyle, the OCR control may provide methods such as source, output, and color grade, etc.

If it happens to be a DLL you may have to provide a Reference to it from Project -> References.  Then you will have to create an instance of the DLL something similar to:

Private myControl as LeadToolsOCR      or ...
Private myControl as LeadToolsOCR.clsScan

Within your form load event you would perform something like so;
Set myControl = New LeadToolsOCR   'To create the instance

This process would then expose the methods for the DLL.  So after created this instance you may have events declared automatically within your form.  

Whew!  Hope this info helps some.  Thanks for the grade.  Some of the OCR samples from planet-source-code didn't use a commercial product, so along with the free speech SDK, you may get lucky and find a free OCR control.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.