程序如何连接扫描仪??

yigu 2003-07-22 10:44:49
一个客户向我们提出这样的要求。当他的客户拿着产品去他们公司维修时,他们拿着那个东西(不知道怎么称呼,叫扫描仪吧)往条形码一扫,然后编号就在程序的文本框中显示出来。这样做有什么方法可以实现 ?需要用什么特殊的控件吗?难不难?
谢谢!
...全文
68 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
CBASE 2003-10-22
  • 打赏
  • 举报
回复
添加一个imgscan 和 一个imgecit控件
' this is a very small example of how you can
' scan a picture from the scanner and display
' it on a img control. you can create a scanning
' program, with a simle ocx. i took about 1minute
' out of my time to create this.
Private Sub Command1_Click()
' scanner available?
ImgScan1.ScannerAvailable
' open scanner port
ImgScan1.OpenScanner
' start scanning
ImgScan1.StartScan
End Sub

Private Sub ImgScan1_PageDone(ByVal PageNumber As Long)
Label1.Caption = "状态: 页 " & PageNumber & " 完成."
End Sub
Private Sub ImgScan1_ScanDone()
Label1.Caption = "状态: 完成扫描."
End Sub
Private Sub ImgScan1_ScanStarted()
Label1.Caption = "状态: 开始扫描."
End Sub
SuperZhou 2003-10-22
  • 打赏
  • 举报
回复
对串口进行操作吧

7,759

社区成员

发帖
与我相关
我的任务
社区描述
VB 基础类
社区管理员
  • VB基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧