Help with - "Do you want fries with that?"

Hi

I wrote an app a long time ago that looked perfectly suited for a touch screen display.  The user could choose the item or items that they want to enter into a POS terminal and could enter the cash or check transaction and generate a receipt.

I just realized after installing a touchscreen that I never programmed the buttons with the numbers 0-9 or the decimal point to replace their keyboard equivalents.  Does anyone know what code is necessary to have a button with a '3' caption to press the '3' on the keyboard within its click event

Any help would be appreciated.

Thanks
-Tom


Answer this question

Help with - "Do you want fries with that?"

  • Jon_The_Coder

    Hi Tom,

    I did a similar thing some years ago. Just create a Commandbutton class with the correct size, and add this code in the click event:

    KEYBOARD This.Caption

    Then add a bunch of those buttons into a toolbar, edit the captions of those buttons and presto: there ya go. You could also use a Form with AllwaysOnTop = .t. or marked as dockable in VFP9.

    Fox Rocks!


  • Charles Aimer

    Thanks guys -

    It was one of those programmer's block situations.  I wrote the app 7 years ago, and I don't know the programmer anymoreBig Smile  I had tried the KEYBOARD command, but was neglecting to setfocus() to the proper control, so it wasn't working.  Now I have to work through the problem that I used the lostfocus() method on the textbox to complete the transaction.  Everytime I hit a button, it re-runs the lostfocus() code and I lose the previous entry.  (Bad programmer)

    -Tom

  • zdjray

  • Help with - "Do you want fries with that?"