barcode scanner component
Posted
#1
(In Topic #833)
Trainee
i tried a sample code from this forum which shows the below error
Code
unknown identifier: SerialPort (Form1.class:3) errorCode
Bus 003 Device 020: ID 24ea:0197 Meva Barcode Scanner
Posted
Guru

Posted
Administrator

I run into this same problem a while ago.
First of all, forget SerialPort, it is way more simple (as Cogier already stated).
The USB barcode scanner acts as keyboard input.
Make a form with a TextBox (let's call it tbxBarCode) and a Label (let's call it lblScannedBarCode)
Next apply following code on the Form
The Label is just to be able to have some code in the KeyPress event to demonstrate that the barcode is scanned.
I have an application that scans this code in a TextBox that is invisible (but keep in mind the TextBox does needs the focus upon scanning) and next, after scanning, starts to give some info on the scanned article (like name, price etc.) retrieved from a database.
I guess you can take it from here, feel free to ask if you get into trouble.
Enjoy…
gbWilly
- Gambas Dutch translator
- Gambas wiki content contributor
- Gambas debian/ubuntu package recipe contributor
- GambOS, a distro for learning Gambas and more…
- Gambas3 Debian/Ubuntu repositories
… there is always a Catch if things go wrong!
- Gambas Dutch translator
- Gambas wiki content contributor
- Gambas debian/ubuntu package recipe contributor
- GambOS, a distro for learning Gambas and more…
- Gambas3 Debian/Ubuntu repositories
… there is always a Catch if things go wrong!
Posted
Trainee
I tried this but getting unknown identifier tbxBarCode_KeyPress()
gbWilly said
Hi,
I run into this same problem a while ago.
First of all, forget SerialPort, it is way more simple (as Cogier already stated).
The USB barcode scanner acts as keyboard input.
Make a form with a TextBox (let's call it tbxBarCode) and a Label (let's call it lblScannedBarCode)
Next apply following code on the Form
The Label is just to be able to have some code in the KeyPress event to demonstrate that the barcode is scanned.
I have an application that scans this code in a TextBox that is invisible (but keep in mind the TextBox does needs the focus upon scanning) and next, after scanning, starts to give some info on the scanned article (like name, price etc.) retrieved from a database.
I guess you can take it from here, feel free to ask if you get into trouble.![]()
Enjoy…
Posted
Guru

1 guest and 0 members have just viewed this.


