You need to be a premium member to use this feature. To access it, you'll have to upgrade your membership.
Become a sharper developer and jumpstart your career.
$0
$
. 00
monthly
For Basic members:
$10
For Premium members:
In this tutorial, I will show a very simple trick of how to integrate the functionality of scanning your documentation with a numeric scanner in your C# application.
WalkthroughYou have to know that this kind of operation is only leveraged within windows XP environment, moreover, the WIA API is not automatically delivered with Windows; therefore, it must be downloaded from this link. http://www.microsoft.com/downloads/details.aspx?FamilyID=a332a77a-01b8-4de6-91c2-b7ea32537e29&displaylang=en
First, install the WIA API by extracting the content of the zipped file then by copying and pasting the wiaaut.dll assembly to C:\Windows\System32 and finally by registering the assembly using the regsvc32.exe
Figure 2.Add a new class to your project and name it Scanner:using System;using WIA;
namespace ScanImage{ public class Scanner { Device oDevice; Item oItem; CommonDialogClass dlg; public Scanner() { dlg = new CommonDialogClass(); oDevice = dlg.ShowSelectDevice(WiaDeviceType.ScannerDeviceType, true, false); } public void Scann() { dlg.ShowAcquisitionWizard(oDevice); } }}
In order to consume the services of this very simple class add a button and a picture box to your form as your project is Windows form one, the form should looks like this bellow:
Now run the application and observe:
Figure 4.Click OKFigure 5.Then the below windows appears :
Figure 8 .As showed above, the scanning process will be lunched as normally, click next then finish and the paper will be scanned as bellow:
Figure 9You can browse to the emplacement of the given scanned image and display it using the picture box.
Figure 10That's it God Dotneting !!!
Solutions Manual to Objects First with Java – A Practical Introduction using BlueJ