 |
|
ตอนนี้ทำโปรแกรมสร้างQRจากAccessได้แล้ว โดยทำตามจากลิงค์นี้ค่ะ
https://youtu.be/GN0ecCs3TOY
ซึ่งสามารถสร้างและอ่านได้ แต่ปัญหาคืออยากให้สามารถอ่านภาษาญี่ปุ่นได้ด้วย ซึ่งตอนนี้ไม่รองรับค่ะ
เช่นรหัส 050078801CS ギャクシベンスプール สามารถสร้างQR Code ได้
แต่ตอนอ่าน ไม่รองรับภาษาญี่ปุ่น จะแสดงเป็น 050078801CS ??????แทนค่ะ
ที่คิดไว้คือสามารถแก้ไขตรงไหน หรือไปConvert Encoding เป็นShift_JIS ให้รองรับภาษาญี่ปุ่นได้ไหมคะ
รบกวนผู้รู้ทุกท่านด้วยนะคะ
โค้ดจากModule
Code
Private Declare PtrSafe Sub QRCodeEncode Lib "QRCode_x86.dll" _
(ByVal Message As String, ByVal version As Integer, ByVal level As Integer, ByVal Mask As Integer)
Private Declare PtrSafe Function QRCodeGetRows Lib "QRCode_x86.dll" () As Integer
Private Declare PtrSafe Function QRCodeGetCols Lib "QRCode_x86.dll" () As Integer
Private Declare PtrSafe Function QRCodeGetCharAt Lib "QRCode_x86.dll" (ByVal RowIndex As Integer, ByVal ColIndex As Integer) As Integer
Private Const version = 0
Private Const level = 0
Private Const Mask = 0
Public Function QRGen(Plain_Text As String)
Dim RowCount As Long, ColCount As Long, i As Long, j As Long
Dim Message As String, EncodedMsg As String
Message = Plain_Text
Call QRCodeEncode(Message, version, level, Mask)
RowCount = QRCodeGetRows()
ColCount = QRCodeGetCols()
For i = 1 To RowCount
For j = 1 To ColCount
EncodedMsg = EncodedMsg & Chr(QRCodeGetCharAt(i - 1, j - 1))
Next j
EncodedMsg = EncodedMsg & vbCrLf
Next i
QRGen = EncodedMsg
End Function
Tag : Ms Access, MySQL, Report Others, VB.NET
|
ประวัติการแก้ไข 2018-06-21 11:25:07
|
 |
 |
 |
 |
Date :
2018-06-21 11:21:27 |
By :
earth1234 |
View :
2485 |
Reply :
3 |
|
 |
 |
 |
 |
|
|
|
 |