Access Scanner from VB .NET application

Hi everyone,

I am using VB .NET with HP scanjet 7400c scanner. I want to access scanner directly from the application. I have gone through a code but that code opens the interface of scanner. i want to make my application state of the art that the preview of the document will show from my application and user will select the particular area for scanning and then scanner will scan according to instructions and save it on hard disk.
Can anybody tell me that how can i take a start for this or is there any component in .NET which has already been developed by someone.

Help me
Who is Participating?
naiea1231Connect With a Mentor Commented:
You might also want to take a look at Windows XP Windows Image Acquisition (WIA) scripting.

If this can do what you want and your clients are using Windows XP this may be an easier option especially while using VB.NET

In the comments section of the above link there is a particular comment dealing with acquiring images from a scanner without a UI directly into a program and the produced code by Maxim Telegin was reported to work well (it is in C# but can be easily converted):

"I did it using the Child[0] object of wiaRoot (scanner) and setting properties via wiaRoot.GetPropById, for example:"
wiaRoot - the WIA Device ItemClass object

wiaItem = (ItemClass) Marshal.CreateWrapperOfType( wiaRoot.Children[0], typeof(ItemClass) );

string fileToSave = "some filename";

wiaItem.Transfer( fileToSave, true );

Let us know how it goes,

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.