我如何扫描许多页面并保存在vb.net中 [英] how can i scan many pages and save in vb.net

查看:92
本文介绍了我如何扫描许多页面并保存在vb.net中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Dim CD As New WIA.CommonDialog
Dim F As WIA.ImageFile =  CD.ShowAcquireImage(WIA.WiaDeviceType.ScannerDeviceType)

If IO.Directory.Exists(My.Application.Info.DirectoryPath + "\tmpimg") = False Then
   IO.Directory.CreateDirectory(My.Application.Info.DirectoryPath + "\tmpimg")
End If

Dim pic As New powerImage 'PictureBox
Dim sFile As String

sFile = "tmp" + New Random().Next.ToString + ".jpg"
F.SaveFile(My.Application.Info.DirectoryPath + "\tmpimg\" + sFile) ' αποθηκευω την εικονα

pic.Image = New Bitmap(My.Application.Info.DirectoryPath + "\tmpimg\" + sFile, False)
pic.Width = fpanelImages.Width - 25
pic.Height = pic.Width + (0.7 * pic.Width)

fpanelImages.Controls.Add(pic)

推荐答案

WIA不支持某些扫描仪的功能,例如自动扫描.我希望您会发现自己将停留在最基本的可用功能上,除非您可以告诉用户启动自动扫描"模式,并在此模式下编写自己的循环(如某人建议的那样).
WIA does not support features of some scanners like autoscanning. I expect you will find that you will be stuck with the most basic functionality available, unless you can tell the user to start an ''autoscan'' mode where you write your own loop, as someone suggested.


这篇关于我如何扫描许多页面并保存在vb.net中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆