Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using Barcode Scanner
Message
 
À
03/03/2003 00:59:38
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00760252
Message ID:
00760578
Vues:
20
>dear all,
>
>i have a problem in using barcode scanner.
>i want my text box is cannot be input by keyboard, only with barcode scanner.
>i have tried to block the numeric keypad by disabling the num lock key.
>but still they can access with the numeric button above the character button.
>is there any trick to disable keyboard press, or disable the keyboard access.
>
>regards,
>
>
>Ivan Agusta

Can your scanner send any control codes as a prefix to the actual data ?

The scanners I use can send control chars - I use ALT+Something combinations and an access key on a command button to achieve what you want.

If you know the length of the data being scanned you can:
1. Have the scanner first send a control code to fire a command button which enables your textbox
2. Accept the "keystrokes" from the scanner up until the number of chars expected
3. Disable the textbox again (using the Keypress() event to count the chars entered - or using MaxLength and LostFocus)
Cheers,
Jamie
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform