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
Ïà¹ØÎĵµ£º
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 ......
½ñÌìÔÚ×öVBÏîÄ¿µÄʱºò£¬Ê¹ÓÃÁËListBox¿Ø¼þÀ´»ñȡһЩÁбíÏÓÃÁ˲ŷ¢ÏÖûÓÐListViewºÃÓã¬ListViewÓÐItems£¨SelectItem£©¿ÉÒÔ¶¨Î»µ½µ±Ç°µÄÑ¡ÖÐÏ¶øListBoxûÓУ»ListViewÓÐTag¿ÉÒÔÉ趨ѡÖÐÏîµÄ±êʾ£¬ListBoxûÓС£ÉÏÍøÒ²ÕÒ²»µ½ÔÒò£¬ÖªµÀÈ¥ÔĶÁMSDNºÍ×Ô¼º²âÊÔ¡£
Ö®ºóÖÕÓÚÕÒµ½ÁËÎÊÌâµÄ¹Ø¼ü¡£
ʼþ1£ºÌí¼ÓListBoxÏ ......
ÔÚVBÖÐÒªÏëµ÷ÓÃExcel£¬ÐèÒª´ò¿ªVB±à³Ì»·¾³“¹¤³Ì”²Ëµ¥ÖеēÒýÓÔÏîÄ¿£¬²¢Ñ¡È¡ÏîÄ¿ÖеēMicrosoft Excel 11.0 object library”Ïî¡£ÓÉÓÚÄãµÄExcel°æ±¾²»Í¬£¬ËùÒÔÕâ¸öÑ¡ÏîµÄ°æ±¾ºÅÒ²ÊDz»Í¬µÄ¡£
ÒòΪEXCELÊÇÒÔ²ã´Î½á¹¹×éÖ¯¶ÔÏóµÄ£¬Æä¶ÔÏóÄ£ÐÍÖк¬ÓÐÐí¶à²»Í¬µÄ¶ÔÏóÔªËØ¡£
&n ......
Ç°¼¸ÈÕ£¬Óиö¸çÃÇ˵ÓкܶàµçÓ°£¬ÎÊÎÒÒª²»Òª£¿ÎÒ¾ÍÈÃËûÒ»¸öÒ»¸öµÄд¹ýÀ´£¬ÈøçÃÇÀÛ¸ö²»Çá¡£ËùÒÔ¾ÍÏë¼òµ¥Ð´¸ö³ÌÐò£¬»ñÈ¡Ò»ÏÂÎļþ¼ÐÏÂÃæµÄËùÓÐÎļþÃû³Æ£¬ÕâÑù¾Í¿ÉÒÔ½ÚÊ¡ºÜ¶àʱ¼äÁË¡£
Èí¼þÄØ£¬ÎÒÒѾÉÏ´«µ½ÍøÕ¾ÁË£ºhttp://download.csdn.net/source/1802599
vb°æ±¾Ä¿Â¼»ñÈ¡Æ÷ 1.0£¨Áú¾í·ç³öÆ·£©
˵Ã÷£º
1.Ñ¡ºÃĿ¼ºó£ ......