Solved

Scanner question...

Posted on 2000-03-02
2
210 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
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

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
DIR issue 7 54
How to make an ADE file by code? 11 87
RUNRMTCMD from AS/400 12 47
Publisher:   Unknown     VB.exe Application 1 21
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

777 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