Loading...

Acquire without Twain Driver dialog

Support for GdTwain ActiveX and GdTwain Pro ActiveX/SDK.

Acquire without Twain Driver dialog

Postby reynolds » Fri Feb 01, 2008 4:47 am

I want to be able to scan without displaying the Twain Driver dialog. I just want hitting the button to make it start scanning with no detours. Is there another function besides TwainAcquireToImageID that just does the scan?

Also, I need to know how to set the data source without having to display the Select Source dialog, as the TwainSelectSource method does.
reynolds
 

Re: Acquire without Twain Driver dialog

Postby Loïc » Fri Feb 01, 2008 12:22 pm

Hi,

I want to be able to scan without displaying the Twain Driver dialog. I just want hitting the button to make it start scanning with no detours. Is there another function besides TwainAcquireToImageID that just does the scan?


You have just to call the TwainSetHideUI method like this:

Code: Select all
object.TwainSetHideUI(True)


http://www.gdpicture.com/references/gdt ... ideUI.html



Also, I need to know how to set the data source without having to display the Select Source dialog, as the TwainSelectSource method does.


You can list all the twain devices like that :
Code: Select all
For i = 1 To object.TwainGetSourceCount
       MsgBox object.TwainGetSourceName(i)
Next i

http://www.gdpicture.com/references/gdt ... Count.html
http://www.gdpicture.com/references/gdt ... eName.html

Then, you can open the desired device like that:

Code: Select all
object.TwainOpenSource ("Your source name")

http://www.gdpicture.com/references/gdt ... ource.html


Loïc
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4437
Joined: Tue Oct 17, 2006 10:48 pm
Location: France


Return to GdTwain [Pro] ActiveX

Who is online

Users browsing this forum: Google [Bot] and 1 guest