|
| Re: Prevent entering from Keyboard |
| Iniciado por guest, 22,sep. 2016 15:28 - 2 respuestas |
| |
| | | |
|
| |
| Publicado el 22,septiembre 2016 - 15:28 |
Hello,
Is there any way to prevent entering any values through keyboard, but only through a barcode scanner, in an edit box control ? All possible keyboard inputs to be prevented including copy & paste (including Ctrl+C, Ctrl+V, right click and select paste etc).
Happiness Always BKR Sivaprakash |
| |
| |
| | | |
|
| | |
| |
| Publicado el 22,septiembre 2016 - 15:42 |
Hi,
There are several things you can do : - First, you can HIDE the input field and show a display only field. The focus is in the hidden input field and the user cannot set a cursor into it so a mouse paste is not possible - You can block CTRL-V by adding a button with that shortcut - now, because the input field has focus, a regular keyboard input is still possible. You can block that by adding a few lines of code in your edit field "each modification" area. Test the time needed to fill the field or the length of the content, if it's slow, it's the keyboard and you can delete, same thing is only a few chars
Best regards |
| |
| |
| | | |
|
| | |
| |
Miembro registrado 102 mensajes |
|
| Publicado el 22,septiembre 2016 - 16:20 |
Sivaprakash,
be aware that most barcode scanners use Scanwedge or Datawedge to capture the scanned data. This software - which is installed by default on most of the industrial barcode scanners - transfers the data from barcodes as text by keyboard emulation. USB barcode scanners work with keyboard emulation as well.
So if you prevent putting some data into an edit box you also prevent capturing data from the barcode scanner itself.
The way to go is to write your own sys handler in WDM using a scanner driver. You have to use an external library coming from a manufacturer, mostly a .net DLL.
On the other hand, sometimes a barcode is not readable by the scanner. Then it could be usefull to put in the value with the build in keyboard.
HTH Sebastian
-- http://arnoldconsult.de WinDev 21 with Oracle, WinDevMobile Android Apps and Motorola Windows CE Mobile Barcode Scanners, Python 3 with Oracle and MySQL |
| |
| |
| | | |
|
| | | | |
| | |
|