Re: C++ builder 2007, scan in edit with barcode scanner
Goodmorning
Here is some code i wrote. No much things. I want the user to use a scanner barcode and scan on edit. If he use scanner everything is ok. but if he use keyboard copy paste letters on numbers i want to bring a message to use scanner. I wrote the above but its not right. I wrote this code onkeypress event of Edit.. any help?
#
if(Key == '\n' ||Key == '\r') {
MessageDlg("THANK YOU FOR USE SCANNER",mtInformation,TMsgDlgButtons()<<mbOK,0);
Re: C++ builder 2007, scan in edit with barcode scanner
Originally Posted by Leite333
I wrote the above but its not right.
Would you explain how you know that it's not right? Just what you do and what you get. Did you debug your code? Is the handler really fired?
Besides, you have to inspect the Key value and see what data comes in it. You really sure there must be '\n' or 'r' and not virtual key codes?
And the last but not least. There's no need to be rude with the people that are trying to help. If you see they fail to understand you, you re-phrase, or provide some more detailed description, but keep being nice.
Bookmarks