易截截图软件、单文件、免安装、纯绿色、仅160KB

BarCode 算法 VB类库 2

 
Option Explicit
Public Function ascii2Char(strInput As String) As String
Dim i As Integer
Dim strTemp As String
Dim nPos As Integer
Dim nValue As Integer
i = 1
nPos = InStr(i, strInput, "&#", vbTextCompare)
While (nPos > 0)
    ascii2Char = ascii2Char + Left(strInput, nPos - 1)
    strInput = Right(strInput, Len(strInput) - nPos + 1)
    i = 3
    strTemp = ""
    While (i <= Len(strInput) And IsNumeric(Mid(strInput, i, 1)) And Len(strTemp) < 3)
        strTemp = strTemp + Mid(strInput, i, 1)
        i = i + 1
    Wend
    nValue = 0
    If (strTemp <> "") Then nValue = Val(strTemp)
    If (nValue >= 0 And nValue < 128) Then
        ascii2Char = ascii2Char + Chr(nValue)
    ElseIf (nValue > 127 And nValue < 256) Then
        ascii2Char = ascii2Char + ChrW(nValue)
    Else
        ascii2Char = ascii2Char + Left(strInput, i - 1)
    End If
    If (i <= Len(strInput) And Mid(strInput, i, 1) = ";") Then
        i = i + 1
    End If
    strInput = Right(strInput, Len(strInput) - i + 1)
    nPos = InStr(1, strInput, "&#", vbTextCompare)
Wend
If (Len(strInput) > 0) Then
    ascii2Char = ascii2Char + strInput
End If
End Function
Public Function Code39(strToEncode As String) As String
Dim i As Integer
Dim charSet As String
Dim charToEncode As String
Dim charPos As Integer
Dim mappingSet As String
charSet = "0123456789.+-/ $%ABCDEFGHIJKLMNOPQRSTUVWXYZ"
mappingSet = "0123456789.+-/#$%ABCDEFGHIJKLMNOPQRSTUVWXYZ"
strToEncode = asci


相关文档:

VB用COM口发WAPPUSH,返回+CMS ERROR: 500

 给出代码如下:
Type WAPPushPDUStruct
    SMSCLen As String
    SMSCType As String
    SMSC As String
    PROTOCOL As String
    TPMRBase As String
    RePhoneNumLen As String
    ReP ......

浅谈VB编程中网格控件的选用及使用方法

 内容提要摘要: The software of visual basic developed by Microsoft corporation is becoming one of the main develop tools at today。 As it's remarkable peculiarity, the Grid control has very great practical and active use。 This topic discusses how to use the grid control of VB to develop prati ......

vb使用open方法读写文件

 
vb使用open方法读写文件
(一)打开和关闭文件
  1、顺序文件
  打开顺序文件,我们可以使用Open语句。它的格式如下:

Open pathname For [Input |Output |Append] As [#]filenumber [Len = buffersize]
  说明:
  (1)参数pathname 表示要打开的文件名,文件名可以包含有驱动器和目 ......

推荐一些VB的学习交流网站

http://www.Experts-Exchange.com: 非常好的问题 讨论区,高手数不尽,而且这里的人很有专业精神,不会讨论一些和程序无关又无聊的问题。不过想要别人帮你 解决问题,自己也要有真诚的态度。
http://www.Codeguru.com/vb: 有名的源码讨论站 点,特点是在每个源码下面都可以跟帖讨论。
http://www.planet-source-code.co ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号