-
setfocus help needed
i my textbox lostfocus event, i have written a code and at the end of processing of code, the focus should return again to the same textbox.
i am using lostfocus event, because i want to enter barcode numbers in a form through a barcode scanner, and the scanner triggers lostfocus event after entering one value. hence no chance of using other event for my code except lostfocus.
when the processing is done (actually saving the barcode + other info into databasE) the same textbox should be ready to take next input without any user help.
-
Re: setfocus help needed
Barcodes have special start/stop characters. Usually the * for 3of9.
So if I understand correctly, your scanner triggers the LF event after the
entire barcode has been entered?
You could just call the Text1.SetFocus method at the end?
-
Re: setfocus help needed
i sometimes have an issue returing focus to an object that has lost focus.
usually set focus to another object on the form first, then you should be able to return it to the first object in question.