Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Text box should accept value only by barcode scanner.
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00692776
Message ID:
00693916
Vues:
16
>Hi Everybody
>In a simple data collection form, I want to control the user not to enter the data manually in some text boxes. He should fill all these text boxes by scanning barcodes. After scanning shot the cursor should move to the other text box automatically, even the scanned barcode’s length is less than the specified field width.
>Thanks in advance.

The best way to do this is with a scanner connected to the COM port, not the usual keyboard wedge one. Create a class wrapper around mscomm.ocx and use it to read off the port. You then have complete control over the input.

Make the Input text boxes "Read Only" and then the user cannot enter any code from the keyboard. Use the on Comm event to get input from the scanner and validate before pumping into the appropriate textbox and moving the focus all with code.

Alternatively you can very easily program the scanner append a special character eg ~ or # etc after its input. The interactive event could then read this strip off the last char, validate, and send the focus to the
next field!


Bernard
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform