Home › Forums › TWAIN Classic › Detecting pressing scan button in the scanner
- This topic has 1 reply, 2 voices, and was last updated 17 years, 6 months ago by dpenney.
- AuthorPosts
How can i detect action of pressing scan button on the device?
Twain sepcyfication allows for it?
thx@darkride wrote:
How can i detect action of pressing scan button on the device?
Twain sepcyfication allows for it?
thxYou probably have to contact the vendor of the scanner that you want to support to find out how, or if, the device supports this via TWAIN. I’m guessing most vendors don’t support it.
The only thing I see in the specification that seems to fit is CAP_DEVICEEVENT/TWDE_DEVICEREADY or possibly a vendor-specific event using TWDE_CUSTOMEVENTS.
On Windows, the STI (STill Image) interface supports a way to launch an application when the scanner button is pressed. Here’s how to see if your device supports this OS-specific feature:
1) Go into Control Panel->Scanners and Cameras.
2) Right-click on the scanner and select Properties.
3) If the Properties window has an “Events” tab, the device does support STI events. Check that one of the events is a button press.Here’s how to register your application as an STI event handler:
http://msdn.microsoft.com/library/en-us/stillimg/sti_1gyt.asp
And detect when an STI event has caused your app to be launched:
http://msdn.microsoft.com/library/en-us/stillimg/sti_7wbp.asp
- AuthorPosts