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
    
     
	
	
    
    
	Ïà¹ØÎĵµ£º
        
    
     Èç½ñOCX¿Ø¼þÔÚ±à³ÌÖÐÒÑÕ¼ÁìÁ˺ÜÖØÒªµÄµØÎ»,ÎÒÃÇ¿ÉÒÔÀûÓÃOCX¿Ø¼þÍê³ÉһЩÏ൱¸´Ôӵıà³Ì²Ù×÷¡£Í¬Ê±OCX¿Ø¼þ»¹ÓÐÀûÓÚÖ÷³ÌÐòµÄ¼òµ¥»¯¡¢¹¦ÄܵÄÖØÓá¢Òþ²Ø³ÌÐòʵÏÖϸ½Ú¡¢±ãÓÚÉý¼¶¡¢´«²¥·½±ãµÈÓŵ㡣ÏÖÔÚÎÒÃÇ¿ÉÒÔÀûÓÃVB 5.0·½±ãµØÖÆ×÷³ö×Ô¼ºµÄOCX¿Ø¼þ¹©ÎÒÃÇÔÚ±à³ÌÖÐʹÓã¬Í¬Ê±»¹¿ÉÒÔ°ÑËüË͸øÄãÖÜΧϲ»¶±à³ÌµÄÅóÓÑ!ÏÂÃæÁгöÖÆ ......
	
    
        
    
    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 ......
	
    
        
    
    '´´½¨Êý¾Ý¿â
  Private Sub Create(ByVal mdbPath As String)
        If File.Exists(mdbPath) Then
            Throw New Exception("Ä¿±êÊý¾Ý¿âÒѾ´æÔÚ£¬ÎÞ·¨´´½¨")
        ......
	
    
        
    
     Private Declare Function OpenThread Lib "kernel32" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwThreadId As Long) As Long
Private Const THREAD_ALL_ACCESS = &H1F03FF
 OpenThread(THREAD_ALL_ACCESS, 1, Ïß³ÌID)    'ÓÉÏß³ÌIDÈ¡µÃÏ߳̾ä±ú,·µ»ØÏß³Ì¾ä± ......