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
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.
*** Read the sticky in the DB forum about how to get your question answered quickly!! ***
Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".
Some Informative Links: [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
[ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]
MS MVP 2006, 2007, 2008
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.
*** Read the sticky in the DB forum about how to get your question answered quickly!! ***
Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".
Some Informative Links: [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
[ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]
MS MVP 2006, 2007, 2008
you should be able to block (remove) chr(13) in change event of textboxenter key happen ,just like barcode scanner
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
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...
*** Read the sticky in the DB forum about how to get your question answered quickly!! ***
Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".
Some Informative Links: [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
[ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]
MS MVP 2006, 2007, 2008
Hi All
I use keypress event of textbox and pass it to sub to run command.
thanks all