Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Scanner question...

Posted on 2000-03-02
2
Medium Priority
?
217 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 800 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

Enroll in September's Course of the Month

This month’s featured course covers 16 hours of training in installation, management, and deployment of VMware vSphere virtualization environments. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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 Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

688 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