Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Customer Keyboard Problems
Message
 
To
11/07/2017 05:22:44
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Network:
SAMBA Server
Database:
MySQL
Application:
Desktop
Miscellaneous
Thread ID:
01652603
Message ID:
01652624
Views:
123
Hi Dennis,

I#ll tell you how I did in with my POS-app:

1 My Forms contain different containers which are suited to serve different tasks.
There are two of these "panels" which are contaiining buttons as key-replacements,
one is for numeric input only, the other is a basic keyboard-replacement.
I add two pics to illustrate this.

The buttons pass their values to a form -method which handles the simulated keystrokes:
thisform.dokeyhandler(ASC(this.label1.Caption))
You can also use the taf-property.

3. The Textboxes use the Gotfocus and Lostfocus-props to tell the form which txtbox is active
thisform.cactivefield = "txtanrede"
IF thisform.cactivefield <> thisform.lastcontrol
   thisform.cValStore = ""
Endif
cValstore is used to control the input and later to assign the value to the txtbox
thisform.lastcontrol = "txtanrede"
Lostfocus saves the textbox which is left.


4 All this is handled in a form-method which assigns the values to the receivers like
in this excerpt.
thisform.cValStore = thisform.cValstore + CHR(nKeycode)
cCommand = "thisform." + thisform.cactivefield + ".value = '" + thisform.cValstore + "'"
&cCommand
cFeld = thisform.cactivefield
nlength = LEN(ALLTRIM(thisform.&cFeld..value))
thisform.&cFeld..ssTextBox1.SelStart = nLength 
So this is what I basically do, I hope this helps. Please excuse the typos, my eyesight is bad today.

Best regards

Thomas
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform