>Users typically input lots of numbers with the numeric keypad, but when the Control Panel defines the decimal "point" as a comma, the point is not accepted. This is awkward for quick data entry.
>
>Does anyone have a satisfactory solution for this? I want to continue using SET SYSFORMATS ON. I think several approaches are possible in theory, including a) temporarily changing SET POINT for the control that has the focus (how?), b) converting commas to points in .KeyPress().
In DOS days this was no problem. The point key on numeric keypad was giving out a comma in languages which had the decimal comma and point separator. Why has M$ changed this in Windows is beyond me.
Here's how I solved this. In my textbox class, there's a property lExpectsComma. In the .gotfocus there is
this.lExpectsComma=SET("Point")="," and TYPE(this.ControlSource)="N"
and there's this code in .KeyPress:
case this.lExpectsComma and nKeyCode=46
dodefault(44,0)
nodefault
...and that's all. I don't recommend using On Key Label for stuff like this, because it may still be active if something happens that leaves the focus on the textbox (like anything on the toolbar - toolbar controls leave the focus there).