请老师帮忙:
1、怎么能判断本电脑上是否装有扫描仪,如果没装扫描仪就直接提示并什么也 不执行。
2、当有扫描仪,如果打开扫描仪后,不想扫描了,关闭扫描窗口,就直接退出了项目。这个问题怎么解决?
Dim name As String = format(Date.now,"yyyyMMddHHmmssfff") & ".jpg"
Dim scanner As new TwainGui.MainFrame(projectPath & "attachments/" & name ,False)
scanner.Showdialog
Tables("奖惩记录").Current("证件") = name
Dim ftp1 As New FtpClient
ftp1.Host="218.203.157.198"
ftp1.Account = "yyyyyy"
ftp1.password = "xxxxx"
If ftp1.Upload(projectPath & "attachments/" & name ,"\学校档案\证件\" & name,True) = True Then
Messagebox.show("上传完成!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
Else
Messagebox.show("上传失败!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
End If