易截截图软件、单文件、免安装、纯绿色、仅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


相关文档:

浅议非Access数据库在VB中的编程及应用

Visual Basic有着强大的数据库存取能力,不仅能够直接支持Ms Access数据库,而且通过其内部安装的ISAM驱动程序使它能间接支持FoxPro、dBASE等外来数据库。本文不仅从VB数据库体系结构的角度探索了VB对这些外来数据库的支持,还结合了一些实例具体阐述了使用数据库存取对象变量的方法实现这些外来数据库的新建、库结构修改、 ......

vb 模拟鼠标按键

 把鼠标移到屏幕指定位置 如(111.111) 单击一下
再移到屏幕另一指定位置指定位置 如(222.222)单击一下
Private Declare Sub mouse_event Lib "user32" (ByVal dwFlags As Long, ByVal dx As Long, ByVal dy As Long, ByVal cButtons As Long, ByVal dwExtraInfo As Long)
Private Declare Function SetCursorPo ......

VB.NET压缩ACCESS数据库

'创建数据库
  Private Sub Create(ByVal mdbPath As String)
        If File.Exists(mdbPath) Then
            Throw New Exception("目标数据库已经存在,无法创建")
        ......

VB中Shell和ShellExecute函数的使用方法和区别

 写了一个vb的程序,用来把原来写的几个vb和vc的程序整合起来。就是使用Shell函数。结果发现,vc的程序可以很好的显示,但vb写的却一运行就最小化了。仔细查看了一下以下文章,才发现原来shell函数的默认显示模式是windowstyle是等于vbMinimizedFocus。然后就是直接加上一个vbNormalFocus。一切ok!  
vb的s ......

VB 取地址函数大全

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
取 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号