Solved

scanner in delphi

Posted on 2002-05-31
11
1,030 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
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
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

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

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

Suggested Solutions

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…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

828 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