INGGRIS
How to connect device scanner with visual basic, its analogy I made button scan in vb and typing button scan in press scanner live and walk .. how? Help me sir

Recommended Answers

All 21 Replies

Do you mean how to input scanned bar codes? If yes, see for example: here

commented: 3 men walk into a bar, the 4th man ducks. +12

English
Small world. I have apps that are bar code scanner compatible. The button is on the scanner and not n the app.

So far not one client has asked for the button to be in the app.

I mean a document or paper scanner instead of a barcode sir

Yes the scan button is always on the scanner, but this is for my thesis sir, my lecturer asked to design a digital document scanner application using visual basic ,, when the button scan in visual basic on press scanner on and scanned the document .. can you help me sir?

@Obbie

Scanners are all over the map about grabbing a scan. So for each scanner you might have to re-write and sometimes call a model incompatible with your app.

Now if you were on Linux I'd point you to SANE.

The scanner manufacturer may have some open source code to use to write your own scanning apps. They may be in something like C++ using an API like Qt, but you should be able to adapt that to VB. It is the interfaces to the scanner that are critical here, buttons not-withstanding. Those are what you need in order to control the scanner.

commented: API and examples by the scanner maker is critical, unless Linux and SANE. By extension Windows is insane. +12

That's all ?

commented: That's all folks! +0

@dear all
Can you help me to show link or program code to connect device scanners to vb, I am in windows, this is for my thesis I do not know anymore how to do

Or is it the right keyword to search for it on google

@Obbie. I guess I was unclear. For each make and model this may change. So let's try again.

Supply us with a make and model and we'll see if the maker supplied an API or example.

Can you explain the twain function in visual basic?

In the best case, you just only need to look for TWAIN or WIA in Tools>Extensions manager in VS, or looking for these in your project via manage Nuget Packages. You can find some wrappers that can help you.
In then worst case you must look for a dll provided with the device, and make your own wrapper with interop services.

Good luck

Here's the deal with TWAIN or WIA. I've seen folk try that and it breaks as the next user has a different make/model scanner.

My view is this area is a mess so you have to pick a scanner and sort out how this one works.

I still do not understand ,, hopefully my thesis finished hehe

@Obbie. Why not share the make, model of the scanner? That way folk can comment about how that one works rather than telling you in general terms.

I can not give an overview but how it works when the scan button in vb in scanner clicks directly works and the results are stored in the database .. so I hope there is a script to share my scanner to connect to visual basic ... The purpose of my thesis is we No need to press the scan button we just play click on the program vb and scanned the results into the database .. please me sir how to design the program for the scanner connected with visual basic 2010

You've asked the question quite a few times and I see good answers about WIA and TWAIN but you seen to be missing the problem. Ready?

There is no one single method that will work with all scanners on vb.net. Until you get your scanner in hand you won't know if you'll be implementing it in WIA, TWAIN or other.

As an example I have a scanner that has no WIA, TWAIN or any other programming interface. It's pretty nice in that it shows up as a drive letter and when you press the button on the scanner it scans and the old scan in that file vanishes and a new file with a new filename shows up.

To press the button on this one I would have to make a ROBOT to press the button.

How to make a robot can you help?

Sorry i still do not understand ,, may be what i mean is how to implement the program in vb when scan button in click scan result directly stored in the database?

@Obbie. You have yet to break your design down to steps. For example you ask how to press the button and folk have replied it depends on the make and model of the scanner. You're stuck on the first step.

I shared a scanner I own has no published way to press the button and a possible robotic button pusher and here you are again asking for what appears to be the same question up top.

Until you supply a make, model scanner no one can answer how to push its button. But even then folk might not tell you. Why? You don't seem to be working the problem. You seem to want the code.

There is no code. You must write that after you see if your scanner supports such a button press.

Are you still looking for the code for accessing a scanner? I had to do the same thing. I was tired of having to go through multiple forms and third party apps so I was able to find come vb code which I modified so that I could go directly from small vb front end (that listed all scanners) to the scanner interface. I'd be happy to post the project file here if you still need it.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.