彩票走势图

BarCode Reader SDK使用教程:用VB6实现条码的生成和读取

原创|使用教程|编辑:龚雪|2015-10-30 13:43:46.000|阅读 1571 次

概述:分享两段关于在BarCode Reader SDK条码的生成和读取。

# 慧都年终大促·界面/图表报表/文档/IDE等千款热门软控件火热促销中 >>

相关链接:

如何用VB6生成和读取条码?今天给大家分享两段VB6代码,关于在BarCode Reader SDK条码的生成和读取。

生成条码:

Set <span data-scayt_word="bc" data-scaytid="8">bc</span> = <span data-scayt_word="CreateObject" data-scaytid="10">CreateObject</span>("Bytescout.BarCode.Barcode")

' set <span data-scayt_word="symbology" data-scaytid="11">symbology</span> to <span data-scayt_word="Code39" data-scaytid="13">Code39</span>
bc.Symbology = 1 ' 1 = <span data-scayt_word="Code39" data-scaytid="14">Code39</span> <span data-scayt_word="symbology" data-scaytid="12">symbology</span> type

' set barcode value to encode
bc.Value = "012345"

bc.SaveImage "Code39.png"

Set <span data-scayt_word="bc" data-scaytid="9">bc</span> = Nothing

读取条码:

Set <span data-scayt_word="bc" data-scaytid="17">bc</span> = <span data-scayt_word="CreateObject" data-scaytid="19">CreateObject</span>("Bytescout.BarCodeReader.Reader")

' limit to <span data-scayt_word="1D" data-scaytid="1">1D</span> barcodes search only (<span data-scayt_word="2d" data-scaytid="2">2d</span> are not included to speed up search)
bc.TypeToFind = 2066431 ' 2066431=SymbologyFilter.FindAll1D

bc.ReadFromFile "Code39.png"

For i = 0 To bc.FoundCount - 1
<span data-scayt_word="Msgbox" data-scaytid="3">Msgbox</span> "Found barcode on page #" & <span data-scayt_word="CStr" data-scaytid="4">CStr</span>(bc.GetFoundBarcodePage(i)) & " with type " & <span data-scayt_word="Cstr" data-scaytid="5">Cstr</span>(bc.GetFoundBarcodeType(i)) & " and value " & bc.GetFoundBarcodeValue(i)

Next

Set <span data-scayt_word="bc" data-scaytid="18">bc</span> = Nothing
本文译自

标签:VB条形码读取条形码生成

本站文章除注明转载外,均为本站原创或翻译。欢迎任何形式的转载,但请务必注明出处、不得修改原文相关链接,如果存在内容上的异议请邮件反馈至chenjj@pclwef.cn


为你推荐

  • 推荐视频
  • 推荐活动
  • 推荐产品
  • 推荐文章
  • 慧都慧问
扫码咨询


添加微信 立即咨询

电话咨询

客服热线
023-68661681

TOP