Hi All
i get data from input (serial port) and show it in text box .now i need when all data show in text box ,enter key happen ,just like barcode scanner when read data and send enter key as auto.
what should i do?
thanks all
Printable View
Hi All
i get data from input (serial port) and show it in text box .now i need when all data show in text box ,enter key happen ,just like barcode scanner when read data and send enter key as auto.
what should i do?
thanks all
Depends on how you are coded, you could call the keypress event of the textbox and pass it a 13 for the KeyAscii parameter, you could use SendKeys to send an Enter keypress. You could configure whatever is sending the data through the commport to send the enter key code, you could add code to the routine where you receive the data to do an enter key.
How you are processing the data and why you need the enter key press is important. When posting for help you should always give a fully detailed message so we do not need to guess.
Every barcode scanner I have ever used had config options for things like "leading" and "trailing" keypress characters to be added to the scan.
Otherwise they would be useless as "add-on" tools for existing UI screens.
Yes, every one I have saw had this ability as well though I am not sure the OP is talking about a scanner sounds like he wants something to work like a scanner with auto enter key press.
More info would be helpful.
Wow - I just re-read the OP and I believe it's not a barcode scanner question at all...
@unforgiven747 - please show the code you are using to load the textbox from the serial port.
you should be able to block (remove) chr(13) in change event of textboxQuote:
enter key happen ,just like barcode scanner
I think the OP wants to "emulate the enter" key when the serial port load of the textbox is complete.
That's why I asked to show code...
Hi All
I use keypress event of textbox and pass it to sub to run command.
thanks all