Solved

scanner in delphi

Posted on 2002-05-31
11
1,005 Views
Last Modified: 2008-03-03
I want use a scanner from a delphi program, we need the user just press a button and the scanner start to scan a document, then the delphi program must make a name for the image and save it in a specific path.

is it possible?
do I need a component? if yes, Wich one?

Sorry for my english, am just learning :)
0
Comment
Question by:akela11
  • 3
  • 2
  • 2
  • +3
11 Comments
 
LVL 2

Accepted Solution

by:
Tasomia earned 75 total points
ID: 7047190
Hi,

There's a imaging tool that ships with Windows.
Import this ActiveX control in Delphi and generate
a component wrapper.

Import the ActiveX Control "Kodak Image Scan Control"
(Select Component|Import ActiveX Control...)

Now add a TImgScan Component from the Register "ActiveX" to your form.

Change the following Properties in the Object Inspector:

FileType = 3 - BMP_Bitmap
PageOption = 4 - OverwritePages
ScanTo = 2 - FileOnly


procedure TForm1.Button1Click(Sender: TObject);
begin
  if imgScan1.ScannerAvailable then
    try
      imgScan1.Image := 'c:\Scanner.bmp';
      imgScan1.OpenScanner;
      imgScan1.Zoom := 100;
      imgScan1.StartScan;
      Application.ProcessMessages;
    finally
      imgScan1.CloseScanner;
      { Show the scanned image in Image1 }
      imgScan1.Picture.LoadFromFile(Image1.Image);
    end;
end;

HTH

tas
0
 
LVL 9

Expert Comment

by:ginsonic
ID: 7047307
Twice questions . Can delete one and refound your account.
Just contact Community Support.
0
 

Author Comment

by:akela11
ID: 7047331
How i contact the suport communty? am looking for it, but I can't get it (o don't understand all ;)).
tanks.
0
 
LVL 11

Expert Comment

by:robert_marquardt
ID: 7047358
Get the TWAIN conversion from http://delphi-jedi.org/APILIBRARY
0
 

Author Comment

by:akela11
ID: 7047566
Tasomia:

I have instaled in Mi Pc the imagin program, but when i try install the "kodak imagen scan.." component in delphi i don't found it en the list. any Idea?
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 12

Expert Comment

by:Lee_Nover
ID: 7047683
just use some TWAIN component
robert suggested one
you can find many others at www.torry.net/mmtwain.htm
0
 
LVL 9

Expert Comment

by:ginsonic
ID: 7048311
akela11,

Take a look at the left menu . Go to 'EE Community' section and click 'Community Support'.

There put a new question with 0 points and name it 'Please delete...'. Type there the link to one of these question  and put the reason 'Twice questions'.

About your question I gave you couple TWAIN vcl names and the sites where can be found in the first questions .

Nick
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 7051474
Points have been reduced on both (duplicate) open questions, so that akela11 can test both and award the best to experts in each of them.
Moondancer - EE Moderator
0
 

Author Comment

by:akela11
ID: 7053954
I take this comment because it work almost perfect is faster than oters components and the control is shiped in windows.

I found a little error in the code but nothing important:

now is: imgScan1.Picture.LoadFromFile(Image1.Image);
should be:  Image1.Picture.LoadFromFile(ImgScan1.Image);


thanks for your Help Tasomia
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 7054009
Thanks for returning and finalizing this.  Also thanks for letting us know why a "B" versus "A" grade was chosen by adding the bug code error information.
Moondancer - EE Moderator
0
 
LVL 12

Expert Comment

by:Lee_Nover
ID: 7055812
what about the version conflicts with the supplied imgScan controls ?

win95 and win98 are incompatible
so is win2k incompatible with the others
(found that out when using VB with these)
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

705 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now