Hello!
I have a little problem with my price checker application, I'm using a windows form/VB.NET in VS2019, the app works just fine, I scan a product's bar code (using a regular laser bar code reader), the scanner puts the code into my TextBox1, on a Keydown event then it goes to my product_table in my DB and looks for that particular bar code then returns 3 values to 3 different Labels.
1. The product's name.
2. The price.
3. The Stock.
As I said, everything works just fine except for the fact that if the focus is not in the TexBox1 it won't do its thing. I mean if the focus is in TextBox2 the scanner will drop the code there and nothing happens obviously because TextBox2 is not part of the show, it is used for something else.
Is there a way that every time I fire the scanner it always drops the code into TexBox1 no matter where the focus is located at?
This is how my Form Looks like...
![Name: Inked05_LI.jpg
Views: 15
Size: 39.0 KB]()
I have a little problem with my price checker application, I'm using a windows form/VB.NET in VS2019, the app works just fine, I scan a product's bar code (using a regular laser bar code reader), the scanner puts the code into my TextBox1, on a Keydown event then it goes to my product_table in my DB and looks for that particular bar code then returns 3 values to 3 different Labels.
1. The product's name.
2. The price.
3. The Stock.
As I said, everything works just fine except for the fact that if the focus is not in the TexBox1 it won't do its thing. I mean if the focus is in TextBox2 the scanner will drop the code there and nothing happens obviously because TextBox2 is not part of the show, it is used for something else.
Is there a way that every time I fire the scanner it always drops the code into TexBox1 no matter where the focus is located at?
This is how my Form Looks like...