Solved

Scanner question...

Posted on 2000-03-02
2
215 Views
Last Modified: 2010-05-02
How can I from VB, check is a scanner is connected and if it is ON.

And also, how can import a part of a picture in the scanner to a database, and give it(picture) a name.

Please help me, I really need it

Source code will be nice
Thanks
0
Comment
Question by:fguerreiro_inix
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 

Accepted Solution

by:
moshepeled earned 400 total points
ID: 2576204
Use the wang control !
it's free and you can got the status of the Scanner

other function of the wng is the UniqeNumber , when you create new image
you run the Method of UniqeNumber and it will be save the image to the destination directory with Uniqe name
now just collect it in Blob field in your DB


I hope i was hellped.
Moshe,
mpeled@iname.com
http://back.to/mp
0
 
LVL 12

Expert Comment

by:mark2150
ID: 2576231
Storing images in a database is a BAD idea. Although you can save them with the BLOB method, the problem arises when you want to show the image back to the user. The LoadPicture method only works from disk so you have to pull the data out of the database, write it to disk and then reload it into the control. The first two steps make it 2x slower than if you just leave the image out on disk. This question comes up all the time. Keeping images in the database also causes your database to rapidly bloat and doesn't scale. If you simply keep a pointer to the external file in the database instead of the image itself you get much faster operation and you'll be able to store tons more data than you would keeping the images inside. You can even have the images spread over several directories/drives/servers to have more images online than you can fit on any single disk volume.

As for testing the scanner from vb, you shouldn't tie your program that tightly to the scanner. Simply fire off the TWAIN compliant device and let the OS worry about managing the hardware. This will allow your code to automatically adapt to different hardware configurations and is consistent with the hardware management structure of windows.

M
0

Featured Post

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month8 days, 19 hours left to enroll

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question