看了很多关于这方面的资料,很多人都直接引用了天津师范大学 曹进军的论文.
我大概也知道怎么用.但是使用文中提到的ACTIVEX控件控制扫描仪的时候, 总是弹出标准的扫描界面(及
扫描仪生产厂商提供的扫描处理软件), 现想提高自己软件的集成度, 根据要扫描的
单据的类型的不同, 在自己的软件界面上自动填充各种控制扫描仪的参数, 或是
手动填写, 而不要在上面提到的标准界面中操作(也就是不弹出标准界面).试过设置控件提供的ZOOM, 图片类型等属性,但是都不起作用.该怎么样控制扫描仪, 让他不弹出标准的扫描界面, 又能让自己设置的扫描参数有用?

解决方案 »

  1.   

    建议看看
    http://www.yesky.com/20000319/35312.shtml

    http://www.cx66.com/cxgzs/program/delphi/247.htm
      

  2.   

    http://www.2ccc.com/article.asp?articleid=1160
    look this it ....
      

  3.   

    Than you for your mail
      

  4.   

    ghyghost(爱国人士--N年后,是否还残存一条▼~~~~) 提供的控件很不错,老外作的东东,很专业。一个很好的Twain组件,它是完全免费的。可用于从数码相机或扫描仪获取图片,因为它主要是对Windows自带的TWAIN_32.DLL(\WINDOWS目录)和TWUNK_32.EXE(\WINDOWS目录)的封装,请确保你的Windows目录有这两个文件。压缩包含组件代码,帮助,简单例子和复杂例子。支持三种传输模式:本地模式,文件模式以及内存模式。但还是不能直接的向扫描仪提供各种参数: 如分辨率, 图片类型(黑白,灰度,彩色)等,依旧弹出标准的扫描界面(及扫描仪生产厂商提供的扫描处理软件).是不是使用TWAIN_32.DLL是不能够实现这些参数的控制的? 倘若这样的话,扫描仪生产厂商提供的扫描处理软件是如何来控制扫描仪的??
      

  5.   

    细心的看了一下,发现用ImgEdit, ImgScan控件时,设置
    ImgScan1.ShowSetupBeforeScan := False;时就不弹出标准界面了。但是分辨率如何设置??????是不是不能通过这两个控件设置的?
    如果不是,如何设置???
      // 图片色深
      // 0: Custom
      // 1: Common
      // 2: 彩色(24位)
      // 3: 灰度(8位) 
      // 4: 黑白(2位)
      ImgEdit1.ImagePalette := StrToInt(COmboBox2.Text);  if ImgScan1.ScannerAvailable then
        ImgScan1.OpenScanner;  // 图片文件类型
      // 1: TIFF
      // 2: AWD(传真)
      // 3: BMP
      // 6: JPG
      ImgScan1.FileType := StrToInt(ComboBox1.Text);  // 图片缩放比率
      // 0--100
      ImgScan1.Zoom := StrToInt(LabeledEdit1.Text);  // 扫描时不现实标准窗口
      ImgScan1.ShowSetupBeforeScan := False;  ImgScan1.StartScan;  ImgScan1.CloseScanner;
      

  6.   

    上面的图片色深 4: 黑白(色深应该是1位)  
      // 图片色深
      // 0: Custom
      // 1: Common
      // 2: 彩色(24位)
      // 3: 灰度(8位) 
      // 4: 黑白(2位)
      

  7.   

    {******************************************************************}
    {                                                                  }
    { Borland Delphi Runtime Library                                   }
    { Twain interface unit                                             }
    {                                                                  }
    { Portions created by TWAIN Working Group,                         }
    { see Copyright statement from original file below                 }
    {                                                                  }
    { The original file is: twain.h, released March 15, 2000.          }
    { The original Pascal code is: twain.pas, released 20. Dez 1999.   }
    { The initial developer of the Pascal code is: Uli Tessel (UT)     }
    { ([email protected]) with help of Matthias Thoma (MT)             }
    { ([email protected])                                                }
    { Translation cleaned up and updated to twain 1.9 by:              }
    { Martin Olsson (MO), [email protected]                                }
    {                                                                  }
    { Obtained through:                                                }
    { Joint Endeavour of Delphi Innovators (Project JEDI)              }
    {                                                                  }
    { You may retrieve the latest version of this file at the Project  }
    { JEDI home page, located at http://delphi-jedi.org                }
    {                                                                  }
    { The contents of this file are used with permission, subject to   }
    { the Mozilla Public License Version 1.1 (the "License"); you may  }
    { not use this file except in compliance with the License. You may }
    { obtain a copy of the License at                                  }
    { http://www.mozilla.org/MPL/MPL-1.1.html                          }
    {                                                                  }
    { Software distributed under the License is distributed on an      }
    { "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or   }
    { implied. See the License for the specific language governing     }
    { rights and limitations under the License.                        }
    {                                                                  }
    {******************************************************************}{ ======================================================================== Copyright (C) 1991, 1992 TWAIN Working Group: Aldus, Caere, Eastman-Kodak,
     Hewlett-Packard and Logitech Corporations. All rights reserved. Copyright (C) 1997 TWAIN Working Group: Bell+Howell, Canon, DocuMagix,
     Fujitsu, Genoa Technology, Hewlett-Packard, Kofax Imaging Products, and
     Ricoh Corporation. All rights reserved. Copyright ?1998 TWAIN Working Group: Adobe Systems Incorporated,
     Canon Information Systems, Eastman Kodak Company,
     Fujitsu Computer Products of America, Genoa Technology,
     Hewlett-Packard Company, Intel Corporation, Kofax Image Products,
     JFL Peripheral Solutions Inc., Ricoh Corporation, and Xerox Corporation.
     All rights reserved. Copyright ?2000 TWAIN Working Group: Adobe Systems Incorporated,
     Canon Information Systems, Digimarc Corporation, Eastman Kodak Company,
     Fujitsu Computer Products of America, Hewlett-Packard Company,
     JFL Peripheral Solutions Inc., Ricoh Corporation, and Xerox Corporation.
     All rights reserved. TWAIN.h - This is the definitive include file for applications and
         data sources written to the TWAIN specification.
         It defines constants, data structures, messages etc.
         for the public interface to TWAIN. Revision History:
      version 1.0, March 6, 1992. TWAIN 1.0.
      version 1.1, January 1993.  Tech Notes 1.1
      version 1.5, June 1993.   Specification Update 1.5
                     Change DC to TW
                     Change filename from DC.H to TWAIN.H
      version 1.5, July 1993.   Remove spaces from country identifiers  version 1.7, July 1997    Added Capabilities and data structure for
                     document imaging and digital cameras.
                     KHL.
      version 1.7, July 1997    Inserted Borland compatibile structure packing
                     directives provided by Mentor. JMH
      version 1.7, Aug 1997    Expanded file tabs to spaces.
                     NOTE: future authors should be sure to have
                     their editors set to automatically expand tabs
                     to spaces (original tab setting was 4 spaces).
      version 1.7, Sept 1997    Added job control values
                     Added return codes
      version 1.7, Sept 1997    changed definition of pRGBRESPONSE to
                     pTW_RGBRESPONSE
      version 1.7 Aug 1998    Added missing TWEI_BARCODEROTATION values
                     TWBCOR_ types JMH
      version 1.8 August 1998   Added new types and definitions required
                     for 1.8 Specification JMH
      version 1.8 January 1999  Changed search mode from SRCH_ to TWBD_ as
                     in 1.8 Specification, added TWBT_MAXICODE  JMH
      version 1.8  January 1999    Removed undocumented duplicate AUTO<cap> JMH
      version 1.8  March 1999      Removed undocumented 1.8 caps:
                                     CAP_FILESYSTEM
                                     CAP_PAPERBINDING
                                     CAP_PASSTHRU
                                     CAP_POWERDOWNTIME
                                     ICAP_AUTODISCARDBLANKPAGES
                                   * CAP_PAGEMULTIPLEACQUIRE - is CAP_REACQUIREALLOWED,
                                     requires spec change.  JMH
                                     Added Mac structure packing modifications JMH
      version 1.9  March 2000      Added new types and definations required
                                     for 1.9 Specification MLM
      version 1.9  March 2000      Added ICAP_JPEGQUALITY, TWJQ_ values,
                                     updated TWON_PROTOCOLMINOR for Release v1.9 MN ======================================================================== }{
     Revision History for translation:   Version 1.8.0: 29.08.99 - UT
          Initial translation, based on twain.h, version 1.8   Version 1.8.1: 12.09.99 - UT
          SizeOf for all structures checked and corrected.
          (Alignment is 2 Bytes for the C Code and 'packed record' uses
          1 Byte alignment. Only types using TW_xINT8 are affected)   Version 1.8.2: 19.12.99 UT
          Added MPL and the other JEDI Statements
          Added EXTERNALSYMS to support C++ Builder
          Created the .PAR file (no Unicode things are used by the TWAIN API?)
          A bit better formatting of the source   Version 1.8.3: 20.12.99
          MT: Added Delphi-Aliases to the structures (like TTWFrame = TW_FRAME)
          UT: Added missing Externalyms for some constants   Version 1.9.0: 01.12.00
          MO: Updated translation to conform with twain.h 1.9
          MO: Cleaned up style to to fit JEDI standards
    }
      

  8.   

    // 图片色深
      // 0: Custom
      // 1: Common
      // 2: 彩色(24位)
      // 3: 灰度(8位) 
      // 4: 黑白(2位)  ImgEdit1.ImagePalette := StrToInt(COmboBox2.Text);  if ImgScan1.ScannerAvailable then
        ImgScan1.OpenScanner;  // 图片文件类型
      // 1: TIFF
      // 2: AWD(传真)
      // 3: BMP
      // 6: JPG
      ImgScan1.FileType := StrToInt(ComboBox1.Text);  // 图片缩放比率
      // 0--100
      ImgScan1.Zoom := StrToInt(LabeledEdit1.Text);  // 扫描时不现实标准窗口
      ImgScan1.ShowSetupBeforeScan := False;  ImgScan1.StartScan;  ImgScan1.CloseScanner;