Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Touchscreen (again?) 1

Status
Not open for further replies.

florindaniel

Programmer
Dec 4, 2009
120
RO
Hello all,

I've read previous threads concerning touchscreens but I did not find a solution to the problem.
I need more than pressing buttons, I have a numeric keypad and a text control to enter EAN-13 code of the product (let's forget for the moment of the Quantity text).
The main problem I am facind is that each button (0-9) press also fires a Valid-Lost Focus sequence of the text control and I really dont't know how to finish the read cycle.
I can introduce the AEN code by means of keyboard or barcode reader = code + ENTER or by means of the on-screen keyboard. The first way fires the Valid-Lost focus once, after ENTER; the second fires them each time I press a command button.
I also can not check for the validity of the product after each digit because I can (presumely) have codes like 00011 and 000112xxxx (you've got the idea)...
Of course, it seems the best solution is to include the keyboard in another form floating above the main interface but it will be too visually complicated for the user.

Thank you,
Daniel
 
Well, NODEFAULT would keep the focus on the textbox, but then the click events of the buttons wouldn't run.

The best thing would be a seperate form, yes, but a toolbar. Only a toolbar will not remove the focus from the current control.

If you don't want to go for the toolbar, anyway, you've got to rethink the validation routine. You could check if LASTKEY() = 13 in the valid event, which is this way through a barcode scan ending with ENTER but isn't that way through a button touch/press.

So in valid of the textbox you do:
Code:
IF LASTEKY()=13
   * validation
ENDIF

And in the ENTER button of the on screen keyboard you can setfocus to the textbox and use KEYBOARD '{ENTER}'. In fact any click event of the on screen keyboard buttons can simply setfocus to the textbox and then KEYBOARD it's own caption.

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top