Home > Software engineering >  My unit daily management often used qr code, I want to do a qr code management software with VB.
My unit daily management often used qr code, I want to do a qr code management software with VB.

Time:10-15

Bought from the Internet to a qr code reader, VB development kit also want, but found a problem,
Use common interface driver connection, open a TXT, then sweep, should be back to the car and newlines, each sweep a code, the cursor will automatically to the next line of the beginning, with space and time, and finished one thing, the thing that also on the scanner, instrument and yards after one and a half seconds or seconds scanning once again, with the manufacturer to provide VB development kit washed-up, hand pieces soon put up a, is attached to sweep under the 3, repeatedly, as scanning speed is too fast, later, the good is not easy to understand, is the place where the scarlet letter, that place is opened, the engine has been open, and then the engine is very high speed scan, the solution is to write a loop, or intermittent program, let the engine a drive, or delay, make it slow scanning speed, but how to implement, this study for three days, was not recruit, refer to each elder consult, make a ceremonious nod,



Private bytByte As Byte (0 To 2000)

Private Sub Command1_Click ()
ReleaseLostDevice
Unload Me
End Sub

Private Sub Form_Load () 'find equipment
If GetDevice=1 Then
If StartDevice=1 Then 'boot device
setQRable 1 'start QR engine

SetBeepTime 1000 'set scanning hum
The Else
MsgBox "boot device failure
"End the If

The Else
MsgBox "failed to get equipment
"End the If

End Sub


Private Sub Label2_Change ()

If Label2="85" Then Label1="king"
If Label2="41" Then Label1="look"
If Label2="44" Then Label1="tai"
If Label2="83" Then Label1="mountain"
If Label2="64" Then Label1="high"
If Label2="40" Then Label1=", "
If Label2="43" Then Label1="yellow"
If Label2="42" Then Label1=", "
If Label2="5" Then Label1=", "
If Label2="61" Then Label1="big"
If Label2="52" Then Label1="by"
If Label2="82" Then Label1="stone", "
If Label2="45" Then Label1="qin", "
If Label2="84" Then Label1="ren"
If Label2="47" Then Label1=", "
If Label2="49" Then Label1="south"
If Label2="63" Then Label1="after"
If Label2="81" Then Label1="small"
If Label2="56" Then Label1="three"
If Label2="50" Then Label1="the west"
If Label2="48" Then Label1="two"
If Label2="62" Then Label1="than"



End Sub



Private Sub Text1_Change ()
Label2=Mid (Text1, 9, 2)
Text1. Text=""

End Sub




'interval of 1 second
Private Sub Timer1_Timer ()
GetDecodeString bytByte (0)
Text1=Text1 + ByteToStr (bytByte)
End Sub

CodePudding user response:

Then there is no way to it, with its universal driver directly and made a general driver version, (generic driver version is good, don't have to call DLL window itself, save trouble) but also not line, every time to scan, label1 cannot read the things inside, through the study found that because of the development kit is used to scan read, it is the whole list of qr code information as a whole article digital suddenly in TEXT1 inside, so can be used in the extraction and recognition,
And I use the generic driver sweeps the qr code decoder is sweep out a whole bunch of information as a keyboard input information, a word a word to fill up, so each fill in a word, it was off, so in the label1 inside couldn't read anything (marked in red line),
The question now is, how can ability let Text1 inside information, read on, disappear automatically, after completion of identification for the next scan entry, and keep the Text1 focus state, and make information input to finish,,



Private Sub Command1_Click ()

End
End Sub




Private Sub Label2_Change ()

If Label2. Caption="85" Then Label1="king"
If Label2. Caption="41" Then Label1="look"
If Label2. Caption="44" Then Label1="tai"
If Label2. Caption="83" Then Label1="mountain"
If Label2. Caption="64" Then Label1="high"
If Label2. Caption="40" Then Label1=", "
If Label2. Caption="43" Then Label1="yellow"
If Label2. Caption="42" Then Label1=", "
If Label2. Caption="05" Then Label1=", "
If Label2. Caption="61" Then Label1="big"
If Label2. Caption="52" Then Label1="tao"
If Label2. Caption="82" Then Label1="stone"
If Label2. Caption="45" Then Label1="qin"
If Label2. Caption="84" Then Label1="ren"
If Label2. Caption="47" Then Label1="river"
If Label2. Caption="49" Then Label1="south"
If Label2. Caption="63" Then Label1="after"
If Label2. Caption="81" Then Label1="small"
If Label2. Caption="56" Then Label1="three"
If Label2. Caption="50" Then Label1="the west"
If Label2. Caption="48" Then Label1="two"
If Label2. Caption="62" Then Label1="than"

End Sub


Private Sub Text1_Change ()
Label2=Mid (Text1, 9, 2)


Text1. Text=""
Text1. SetFocus
End Sub


CodePudding user response:

Don't be A language code is modified to B language code busywork,
Also don't use A language code to directly invoke B language code base, this complicated things so easy to get wrong,
Just make A, B language code of input and output is redirected to A text file, or modify A, B language code let it through text file input and output,
Can easily make A, B coordination between the two languages,
  • Related