• 大小: 0.15M
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-03-28
  • 语言: C#
  • 标签: c#  

资源简介


找了好久的,C#通过TWAIN调用扫描仪的例子 kbacvodka@163.com,欢迎交流

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Drawing.Imaging;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.IO;
using Twain;

namespace TwainDemo
{
    
    public partial class FrmDemo : Form
    {
        public FrmDemo()
        {
            InitializeComponent();
        }        
        private int mImageIndex = 1;
        private string mRunPath = ““;
        private string mImagePath = ““;
        private Twain32 mTwain = new Twain32();

        private void twEndXfer(object sender Twain32.EndXferEventArgs e)
        {
            string FileNm = mImagePath + “Image_“ + mImageIndex + “.gif“;
            //MessageBox.Show(e.Image.PixelFormat.ToString());
            e.Image.Save(FileNm ImageFormat.Gif);
            mImageIndex++;
        }
        private void FrmDemo_Load(object sender EventArg

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     文件         917  2016-06-28 14:04  TwainDemo.sln
     文件       66048  2016-07-01 15:26  TwainDemo.v11.suo
     目录           0  2016-10-09 11:42  TwainDemo\
     文件         187  2016-06-28 14:04  TwainDemo\App.config
     目录           0  2016-06-28 14:04  TwainDemo\bin\
     目录           0  2016-10-09 11:43  TwainDemo\bin\Debug\
     文件       22984  2016-10-09 11:41  TwainDemo\bin\Debug\TwainDemo.vshost.exe
     目录           0  2016-06-28 14:04  TwainDemo\bin\Release\
     文件        3299  2016-10-09 11:42  TwainDemo\FrmDemo.cs
     文件        8262  2016-06-30 15:22  TwainDemo\FrmDemo.Designer.cs
     文件        5817  2016-06-30 15:22  TwainDemo\FrmDemo.resx
     目录           0  2016-06-28 14:04  TwainDemo\obj\
     目录           0  2016-10-09 11:43  TwainDemo\obj\Debug\
     文件        1308  2016-06-29 08:58  TwainDemo\obj\Debug\DesignTimeResolveAssemblyReferences.cache
     文件        7260  2016-06-30 14:51  TwainDemo\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache
     文件           0  2016-06-28 14:04  TwainDemo\obj\Debug\TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
     文件           0  2016-06-28 14:04  TwainDemo\obj\Debug\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
     文件           0  2016-06-28 14:04  TwainDemo\obj\Debug\TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
     目录           0  2016-06-28 14:04  TwainDemo\obj\Debug\TempPE\
     文件         523  2016-06-28 14:04  TwainDemo\Program.cs
     目录           0  2016-06-28 14:04  TwainDemo\Properties\
     文件        1356  2016-06-28 14:04  TwainDemo\Properties\AssemblyInfo.cs
     文件        2870  2016-06-28 14:04  TwainDemo\Properties\Resources.Designer.cs
     文件        5612  2016-06-28 14:04  TwainDemo\Properties\Resources.resx
     文件        1096  2016-06-28 14:04  TwainDemo\Properties\Settings.Designer.cs
     文件         249  2016-06-28 14:04  TwainDemo\Properties\Settings.settings
     文件      153088  2016-06-29 16:05  TwainDemo\Saraff.Twain.dll
     目录           0  2016-10-09 11:58  TwainDemo\Twain\
     文件        2319  2016-06-30 11:24  TwainDemo\Twain\DibToImage.cs
     文件       34774  2016-10-09 11:47  TwainDemo\Twain\Tiff.cs
     文件      120008  2016-10-09 11:55  TwainDemo\Twain\Twain32.cs
............此处省略4个文件信息

评论

共有 条评论