BarCode 算法 VB类库 1
Option Explicit
' VB / VBA Functions for Code128(A, B,C), UCC/EAN 128
' Copyright 2004 by MW6 Technologies Inc. All rights reserved.
'
' This code may not be modified or distributed unless you purchase
' the license from MW6.
Public UFPrefixFunctions As Boolean
Private I As Integer
Private StrLen As Integer
Private Sum As Integer
Private CurrSet As Integer
Private CurrChar As Integer
Private NextChar As Integer
Private Message As String
Private Weight As Integer
Public Function Code128Auto(ByVal Src As String) As String
StrLen = Len(Src)
Sum = 104
' 2 indicates Set B
CurrSet = 2
' start character with value 202 for Set B
Message = "" & Chr(202)
CurrChar = Asc(Mid(Src, 1, 1))
If (CurrChar <= 31 And CurrChar >= 0) Then
' switch to Set A
' 1 indicates Set A
CurrSet = 1
' start character with value 201 for Set A
Message = "" & Chr(201)
Sum = 103
End If
Weight = 1
Call GeneralEncode(Src)
Code128Auto = Message
End Function
Public Function UCCEAN128(ByVal Src As String) As String
StrLen = Len(Src)
Sum = 105
' 3 indicates Set C
CurrSet = 3
' start character (203) + FNC1 (200)
Message = Chr(203) & Chr(200)
Su
相关文档:
C#自己没有Inputbox这个类,但是Inputbox也蛮好用的,所以有两种方法可以使用
一:.间接调用vb中的Inputbox功能
1。在项目中添加对Microsoft.VisualBasic引用
2。在项目中添加命名空间Using Microsoft.VisualBasic;
&n ......
写了一个vb的程序,用来把原来写的几个vb和vc的程序整合起来。就是使用Shell函数。结果发现,vc的程序可以很好的显示,但vb写的却一运行就最小化了。仔细查看了一下以下文章,才发现原来shell函数的默认显示模式是windowstyle是等于vbMinimizedFocus。然后就是直接加上一个vbNormalFocus。一切ok!
vb的s ......
VB下如何编写CRC校验程序
随着计算机技术的不断发展,在现代工业中,利用微机进行数据通讯的工业控制应用得也越来越广泛。由于传输距离、现场状况等诸多可能出现的因素影响,计算机与受控设备之间的通讯数据常会发生无法预测的错误。为了防止错误所带来的影响,一般在通讯时采取数据校验的办法,而循环冗余码校 ......
Public Declare Function VarPtrArray Lib "msvbvm60.dll" Alias "VarPtr" (Var() As Any) As Long
Public Declare Function VarPtrStringArray Lib "msvbvm60.dll" Alias "VarPtr" (Var() As Any) As Long
取对象地址: ObjPtr
取OLE对象的地址: OLE_NAME.LpOleObject
取函数地址: AddressOf
取字符串地址: StrPtr
取 ......