|
-
Jul 25th, 2012, 09:42 AM
#1
Thread Starter
Addicted Member
[RESOLVED] How can I simulate Enter key as barcode scanner
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
-
Jul 25th, 2012, 12:17 PM
#2
Re: How can I simulate Enter key as barcode scanner
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.
-
Jul 25th, 2012, 03:00 PM
#3
Re: How can I simulate Enter key as barcode scanner
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.
-
Jul 25th, 2012, 04:30 PM
#4
Re: How can I simulate Enter key as barcode scanner
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.
-
Jul 25th, 2012, 04:43 PM
#5
Re: How can I simulate Enter key as barcode scanner
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.
-
Jul 25th, 2012, 04:46 PM
#6
Re: How can I simulate Enter key as barcode scanner
enter key happen ,just like barcode scanner
you should be able to block (remove) chr(13) in change event of textbox
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
-
Jul 25th, 2012, 04:56 PM
#7
Re: How can I simulate Enter key as 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...
-
Jul 26th, 2012, 03:40 AM
#8
Thread Starter
Addicted Member
Re: How can I simulate Enter key as barcode scanner
Hi All
I use keypress event of textbox and pass it to sub to run command.
thanks all
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|