PDA

Click to See Complete Forum and Search --> : Scanners and API


Xenonic_Rob
Aug 14th, 2000, 12:28 PM
Help! Help! Help! :)
Please could someone help me out - can I use the Windows API to control a scanner. I'm writing a program thats a bit like OCR, except it converts sheet music into MIDI files. Clever huh?!
But I haven't started it yet. Any suggestions?

gwdash
Aug 14th, 2000, 12:35 PM
If you now how to use the scanner with api, great! otherwise try a TWAIN ActiveX control. One is avalible from Oylimpus. Post your api code if you have it, please!!

Xenonic_Rob
Aug 14th, 2000, 12:48 PM
I dont have the API code. That's why I'm asking, stupid!
Anyone out there, could you give me the URL to an activex control or code?

Xenonic_Rob
Aug 15th, 2000, 02:00 PM
Anyone?!

Jim Brown
Aug 18th, 2000, 03:57 AM
Robert-

I used the time-honoured method of a Web Search, and Viola! (or Ole!, if you prefer), and here are two places you might try:

TwainPRO- (free download for trial, USD99 to keep):
http://info.apnpc.com.au/swlib/Computer_Programming/Libraries_Custom_Controls/000MO1.html

Olympus Twain Wizard (also a trial download):
http://www.olympus-software.com/

I've been looking for a project to do- maybe you've started something here. (But not Music, though.) Please keep in touch on this.

Cheers,

Jim brown
Johannesburg, South Africa

MKUSA
Aug 21st, 2000, 03:21 AM
Try this:
Select Scanner:
result = TWAIN_SelectImageSource(Me.hWnd)

Scan Dialog:
result = TWAIN_AcquireToClipboard(Me.hWnd, t%)
Picture1.Picture = Clipboard.GetData(vbCFDIB)

You need: 1. PictureBox (Name: Picture1)
External file: Eztw32.dll

Declare Function TWAIN_AcquireToClipboard Lib "EZTW32.DLL" (ByVal hwndApp&, ByVal wPixTypes&) As Long
Declare Function TWAIN_SelectImageSource Lib "EZTW32.DLL" (ByVal hwndApp&) As Long

if u can't find Eztw32.dll e-mail me... :)

Never tested this code myself, but I'm sure it works..
keep me updated with u'r results... :)

gwdash
Aug 21st, 2000, 11:18 AM
please repost with smilies disabled