• vb打印条形码


    Private Sub PrintBarCode(ByVal strBarCode As String, Optional ByVal intXPos As Integer = 0, Optional ByVal intYPos As Integer = 0, Optional ByVal intPrintHeight As Integer = 10, Optional ByVal bolPrintText As Boolean = True)
        '注释: 参数说明:
        '注释: strBarCode    - 要打印的条形码字符串
        '注释: intXPos, intYPos - 打印条形码的左上角坐标(缺省为(0,0),坐标刻度为:毫米)
        '注释: intHeight     - 打印高度(缺省为一厘米,坐标刻度为:毫米)
        '注释: bolPrintText   - 是否打印人工识别字符(缺省为true)
        '注释: "0"-"9","A-Z","-","%","$"和"*" 的条码编码格式,总共 40 个字符
       
        Static strBarTable(39) As String
       
        strBarTable(0) = "001100100"     '注释: 0
        strBarTable(1) = "100010100"     '注释: 1
        strBarTable(2) = "010010100"     '注释: 2
        strBarTable(3) = "110000100"     '注释: 3
        strBarTable(4) = "001010100"     '注释: 4
        strBarTable(5) = "101000100"     '注释: 5
        strBarTable(6) = "011000100"     '注释: 6
        strBarTable(7) = "000110100"     '注释: 7
        strBarTable(8) = "100100100"     '注释: 8
        strBarTable(9) = "010100100"     '注释: 9
        strBarTable(10) = "100010010"    '注释: A
        strBarTable(11) = "010010010"    '注释: B
        strBarTable(12) = "110000010"    '注释: C
        strBarTable(13) = "001010010"    '注释: D
        strBarTable(14) = "101000010"    '注释: E
        strBarTable(15) = "011000010"    '注释: F
        strBarTable(16) = "000110010"    '注释: G
        strBarTable(17) = "100100010"    '注释: H
        strBarTable(18) = "010100010"    '注释: I
        strBarTable(19) = "001100010"    '注释: J
        strBarTable(20) = "100010001"    '注释: K
        strBarTable(21) = "010010001"    '注释: L
        strBarTable(22) = "110000001"    '注释: M
        strBarTable(23) = "001010001"    '注释: N
        strBarTable(24) = "101000001"    '注释: O
        strBarTable(25) = "011000001"    '注释: P
        strBarTable(26) = "000110001"    '注释: Q
        strBarTable(27) = "100100001"    '注释: R
        strBarTable(28) = "010100001"    '注释: S
        strBarTable(29) = "001100001"    '注释: T
        strBarTable(30) = "100011000"    '注释: U
        strBarTable(31) = "010011000"    '注释: V
        strBarTable(32) = "110001000"    '注释: W
        strBarTable(33) = "001011000"    '注释: X
        strBarTable(34) = "101001000"    '注释: Y
        strBarTable(35) = "011001000"    '注释: Z
        strBarTable(36) = "000111000"    '注释: -
        strBarTable(37) = "100101000"    '注释: %
        strBarTable(38) = "010101000"    '注释: $
        strBarTable(39) = "001101000"    '注释: *

    本文来源于http://code.niuc.org/thread-4905-1-1.html,转载请注明出处。

  • 相关阅读:
    win10环境下 jdk8安装点击下一步没反应解决办法
    selenium 常见鼠标 键盘事件
    selenium 输入框有默认值,用键盘事件解决
    selenium 键盘事件
    selenium 鼠标事件
    sql length
    ecshop Uncaught transport.js/parseResult() error: can't parse to JSON 错误解决
    j2EE基础知识
    mybatis入门知识
    JVM入门
  • 原文地址:https://www.cnblogs.com/superfans/p/2909738.html
Copyright © 2020-2023  润新知