Perhaps when you program a barcode reader to make longer delays when sending characters to the keyboard buffer, then subsequent OnChange events will appear.Roberto Lopez wrote: ↑Sun Aug 19, 2018 2:19 pm Apparently, when the data comes from the scanner, it generates ONLY ONE OnChange event.
Barcode Scanner vs. TextBox's OnChange
Moderator: Rathinagiri
Re: Barcode Scanner vs. TextBox's OnChange
Re: Barcode Scanner vs. TextBox's OnChange
I had no doubt you would securing your code against the possibility of two identical bar-codes.Roberto Lopez wrote: ↑Thu Aug 23, 2018 11:07 pm I've wrote "defensive code" against this possibility, so is not a problem for me, but, I'm simply curious about that
And like you, curiosity was the "attractor" of my interference in this thread.
I'm using b-codes years now, in a pos app, that's written in harbour textual interface -now slowly transforming it to gui.
I have never encountered such a case of duplicate b-codes in whatever system (EAN-xxx etc) they might be coded.
To the contrary, what I have faced is the situation where the very SAME product has many different bar-codes!!
This is due to the need to cover the different sizes/colors of the same item --usually seen on clothes/shoes etc.
(Anyway, somehow I did manage to cope with it, avoiding the need to create multiple of records for the same item.)
Indeed, google has no much to say us about identical b-codes, and perhaps this lack of info is analogous
to the probability that such duplicate bar-codes do exist. Luckily, the world isn't currently bothered by yet another one IT mess.
Btw, I suspect that reason the `onChange` event is fired only once, is because scanner sends along with the barcode an `Enter` as a suffix of the digits sequence. Perhaps, the use of `onEnter` event could be considered a good alternative to avoid repeated firing on keybord input, unless it is intentionally designed and aimed to do so.
---
Regards,
Pete
Re: Barcode Scanner vs. TextBox's OnChange
Hi Roberto,
Try to change the textbox from onghange to onenter and programming the scanner to send with EAN and the ENTER together. This will bring the entire information to the textbox from the scanner before you start Search.
Try to change the textbox from onghange to onenter and programming the scanner to send with EAN and the ENTER together. This will bring the entire information to the textbox from the scanner before you start Search.
Best Regards,
Nikos.
os: Windows Server 2019 - 64
Nikos.
os: Windows Server 2019 - 64
- Roberto Lopez
- HMG Founder
- Posts: 4004
- Joined: Wed Jul 30, 2008 6:43 pm
Re: Barcode Scanner vs. TextBox's OnChange
This will be difficult (or impossible to say) since the scanner comes from an Argentinian dealer that "rebrands" with its name, imported products, so, there is no way to me to answer that.
Regards/Saludos,
Roberto
(Veritas Filia Temporis)
Roberto
(Veritas Filia Temporis)
Re: Barcode Scanner vs. TextBox's OnChange
I am not sure if this is what you need but when I print a barcode in (font free 3 of 9 extended ) I must put a '*' at start and '* ' at end after
alltrimming the variable or field. Maybe you need to remove the * if it happens to be in the barcode.
This may have something to do with it.
Franco
alltrimming the variable or field. Maybe you need to remove the * if it happens to be in the barcode.
This may have something to do with it.
Franco
All The Best,
Franco
Canada
Franco
Canada
- Roberto Lopez
- HMG Founder
- Posts: 4004
- Joined: Wed Jul 30, 2008 6:43 pm
Re: Barcode Scanner vs. TextBox's OnChange
At first... thanks to all for your answers and suggestions. I've was near to no post about this, since I've believed that could be not enough interest on this topic
As I've said, the "thing" was working nicely at the time of my initial post, so, It was just about my curiosity around it.
I've found my own answer to the mystery: It appears to be all about timing (time elapsed between keystrokes).
It is very easy to test:
You simply must to keep pressed some key and let the auto-repeat feature do the rest, At first, you'll ear a single beep, then (when the auto-repeat starts) no more beeps will be generated, until you stop pressing the key.
Since the barcode scanner is sending the "keystrokes" very fast (the same as auto-repeat) a single OnChange event is generated.
Mystery Solved!
Again... thanks to all for the feedback.
PS: I guess that the timing thing on EN_CHANGE Windows event, is known and (maybe) documented in some Windows programming "bible"... Some Guru outhere ?
As I've said, the "thing" was working nicely at the time of my initial post, so, It was just about my curiosity around it.
I've found my own answer to the mystery: It appears to be all about timing (time elapsed between keystrokes).
It is very easy to test:
Code: Select all
@ 10,10 TEXTBOX Text_1 ;
ON CHANGE PLAYBEEP()
Since the barcode scanner is sending the "keystrokes" very fast (the same as auto-repeat) a single OnChange event is generated.
Mystery Solved!
Again... thanks to all for the feedback.
PS: I guess that the timing thing on EN_CHANGE Windows event, is known and (maybe) documented in some Windows programming "bible"... Some Guru outhere ?
Regards/Saludos,
Roberto
(Veritas Filia Temporis)
Roberto
(Veritas Filia Temporis)
- danielmaximiliano
- Posts: 2611
- Joined: Fri Apr 09, 2010 4:53 pm
- Location: Argentina
- Contact:
Re: Barcode Scanner vs. TextBox's OnChange
Hola Roberto, estoy muy ausente en el foro, resolvió el problema sobre EAN 13 \ EAN 8
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*
Saludos / Regards
DaNiElMaXiMiLiAnO
Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*
Saludos / Regards
DaNiElMaXiMiLiAnO
Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO