Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Want to lock keyboard
Message
De
12/11/2008 03:43:50
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Divers
Thread ID:
01361245
Message ID:
01361247
Vues:
17
If the barcode reader is connected to the keyboard input, you can't disable the keyboard without physically disconencting it! A solution is to program the barcode reader to always send a special character before the actual data, for instance a $. This programming is easy on most barcode readers, and will make the reader send for instance $123abc instead of 123abc. In the textbox's keypress you have code like
if nKeycode>0 and Chr(nKeyCode)#'$' And This.SelStart=1
    Nodefault
Endif
In the lostfocus you have
this.value=substr(this.value,2)
>Hi to all
>I want to lock the key board on a form and use the barcode scanner for input i write the key press procedure
>DO case
>CASE nkeycode=27
>thisform.release()
>CASE nkeycode=5
>MESSAGEBOX("Key boardnot allowed",16,"Validation Error")
>thisform.text1.Value=""
>thisform.Refresh()
>RETURN
>CASE nkeycode equal to greater than 48 AND nkeycode equal to lesser than 123
>MESSAGEBOX("Key boardnot allowed",16,"Validation Error")
>thisform.text1.Value=""
>thisform.Refresh()
>RETURN
>ENDCASE
>
>these command also lock the bar code scanner
>
>any suggestion form you.
>
>thanks
>
>Rashid Mehmood
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform