易截截图软件、单文件、免安装、纯绿色、仅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快速访问注册表的方法

VERSION 5.00
Begin VB.Form frmMain
BorderStyle = 1 'Fixed Single
Caption = "Reg Demo"
ClientHeight = 6570
ClientLeft = 45
ClientTop = 435
ClientWidth = 7695
LinkTopic = "Form1"
MaxButton = 0 'False
Min ......

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

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

VB 发送模拟按键

Dim ReturnValue, I
ReturnValue = Shell("Calc.EXE", 1) ' 运行计算器。
AppActivate ReturnValue ' 激活计算器。
For I = 1 To 100 ' 设置计数循环。
SendKeys I & "{+}", True ' 按下按键给计算器
Next I ' 将所有 I 值相加。
SendKeys "=", True ' 取得总合。
SendKeys "%{F4}", True ' 按 ALT+F4 关 ......

C#中调用VB中Inputbox功能

  C#自己没有Inputbox这个类,但是Inputbox也蛮好用的,所以有两种方法可以使用
   一:.间接调用vb中的Inputbox功能
      1。在项目中添加对Microsoft.VisualBasic引用
      2。在项目中添加命名空间Using Microsoft.VisualBasic;
  &n ......

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