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
相关文档:
Option Explicit
Private Type UNICODE_STRING
Length As Integer
MaximumLength As Integer
Buffer As Long
End Type
Private Type OBJECT_ATTRIBUTES
Length As Long
RootDirectory As Long
  ......
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 关 ......
把鼠标移到屏幕指定位置 如(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 ......
C#自己没有Inputbox这个类,但是Inputbox也蛮好用的,所以有两种方法可以使用
一:.间接调用vb中的Inputbox功能
1。在项目中添加对Microsoft.VisualBasic引用
2。在项目中添加命名空间Using Microsoft.VisualBasic;
&n ......
http://www.Experts-Exchange.com: 非常好的问题 讨论区,高手数不尽,而且这里的人很有专业精神,不会讨论一些和程序无关又无聊的问题。不过想要别人帮你 解决问题,自己也要有真诚的态度。
http://www.Codeguru.com/vb: 有名的源码讨论站 点,特点是在每个源码下面都可以跟帖讨论。
http://www.planet-source-code.co ......