Solved

scanner in delphi

Posted on 2002-05-31
11
1,020 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
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 
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
 
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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
delphi prevent click fast 2 215
Communication Between RC4 Delphi <-> PHP 3 113
how to update exe applicatio from internet ? 6 76
how can i search if string exist in array ? 3 55
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

776 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