• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1789
  • Last Modified:

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
0
aosexpert
Asked:
aosexpert
2 Solutions
 
naiea1231Commented:
You might also want to take a look at Windows XP Windows Image Acquisition (WIA) scripting.

http://www.codeproject.com/dotnet/wiascriptingdotnet.asp

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,

James
 
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now