Features, discussions, tips, tricks, questions, problems and feedback

Twain Scanner functionality

public YourClass() { _twain = new Twain(new WinFormsWindowMessageHook()); _settings = new ScanSettings { UseDocumentFeeder = true, ShowTwainUI = false, ShowProgressIndicatorUI = true, UseDuplex = true, Resolution = ResolutionSettings.Fax, Area = ScanArea.Max, ShouldTransferAllPages = true }; }
i need to implement this functionality but get error here:
_twain = new Twain(new WinFormsWindowMessageHook());
any idea how to resolve or another way to implement a Scanner

Where are you implementing this (graphic form script, spider)? Are you using any additional references? Are you getting an error at compile or Runtime and what is the error?

I am getting the error with the _twain = new Twain(new WinFormsWindowMessageHook());
should i create a new forms page in the vs script or is there an easier way?

You did not elaborate on what error you are getting. Compile time? Runtime? Please also provide a screenshot otherwise there is simply not enough information to provide you with assistance.

Hi Frits
sorry yes, I have moved away from trying the Twain functionality it is giving me to many problems.
I have created a forms app using Microsoft Windows Image Aquisition which works well. I have tried to implement it in Adroit by adding a com reference to and it builds, when i try run though it “removes” that ref?

Oh and update, I cannot add the dll directly “wiaservc.dll” “Please make sure that the file is accessible and that it is a valid assembly or com object”.
I have registered the dll

ok i got it to work, created a dll with all the controls and referenced that. Was hoping for a easier method but this works