I work in Argentina, there you use the point to separate thousands and the
comma for the decimal places. So in VFP 9 I just use SET SYSFORMATS ON,
since the Windows settings are set to Spanish (Argentina).

But there is one problem. On all keyboards that have Spanish or even
Argentine layouts, on the numeric keypad of the keyboard you have just "."
(point) and when you press down this key you get of course a point on the
screen but when in Fox you press it inside a numeric field you don't get
anything. You have to use then the comma in the left part of the keyboard.
How can I achieve to get on screen a comma when I press down the point key
on the numeric keypad?

Re: Keyboard problems by Rush

Rush
Wed Apr 30 11:50:22 CDT 2008

WP wrote:
> I work in Argentina, there you use the point to separate thousands and the
> comma for the decimal places. So in VFP 9 I just use SET SYSFORMATS ON,
> since the Windows settings are set to Spanish (Argentina).
>
> But there is one problem. On all keyboards that have Spanish or even
> Argentine layouts, on the numeric keypad of the keyboard you have just "."
> (point) and when you press down this key you get of course a point on the
> screen but when in Fox you press it inside a numeric field you don't get
> anything. You have to use then the comma in the left part of the keyboard.
> How can I achieve to get on screen a comma when I press down the point key
> on the numeric keypad

Use the textbox.keypress event:

LPARAMETERS nKeyCode, nShiftAltCtrl

IF nKeyCode = ASC('.')
NODEFAULT
KEYBOARD ','
ENDIF

- Rush

Re: Keyboard problems by WP

WP
Wed Apr 30 19:58:29 CDT 2008

Thanks, Rush,

is there a way to distinguish between "." pressed on the numeric keypad and
the "." pressed on the alphabetic keypad?


"Rush Strong" <rpstrong@gmail.com> escribió en el mensaje
news:ir1Sj.2962$5X.2770@trndny08...
> WP wrote:
>> I work in Argentina, there you use the point to separate thousands and
>> the comma for the decimal places. So in VFP 9 I just use SET SYSFORMATS
>> ON, since the Windows settings are set to Spanish (Argentina).
>>
>> But there is one problem. On all keyboards that have Spanish or even
>> Argentine layouts, on the numeric keypad of the keyboard you have just
>> "." (point) and when you press down this key you get of course a point on
>> the screen but when in Fox you press it inside a numeric field you don't
>> get anything. You have to use then the comma in the left part of the
>> keyboard. How can I achieve to get on screen a comma when I press down
>> the point key on the numeric keypad
>
> Use the textbox.keypress event:
>
> LPARAMETERS nKeyCode, nShiftAltCtrl
> IF nKeyCode = ASC('.')
> NODEFAULT
> KEYBOARD ','
> ENDIF
>
> - Rush



Re: Keyboard problems by Rush

Rush
Wed Apr 30 20:32:06 CDT 2008

WP wrote:
> Thanks, Rush,
>
> is there a way to distinguish between "." pressed on the numeric keypad and
> the "." pressed on the alphabetic keypad?
>
Not that I know of.

- Rush
>
> "Rush Strong" <rpstrong@gmail.com> escribió en el mensaje
> news:ir1Sj.2962$5X.2770@trndny08...
>
>> WP wrote:
>>
>>> I work in Argentina, there you use the point to separate thousands and
>>> the comma for the decimal places. So in VFP 9 I just use SET SYSFORMATS
>>> ON, since the Windows settings are set to Spanish (Argentina).
>>>
>>> But there is one problem. On all keyboards that have Spanish or even
>>> Argentine layouts, on the numeric keypad of the keyboard you have just
>>> "." (point) and when you press down this key you get of course a point on
>>> the screen but when in Fox you press it inside a numeric field you don't
>>> get anything. You have to use then the comma in the left part of the
>>> keyboard. How can I achieve to get on screen a comma when I press down
>>> the point key on the numeric keypad
>>>
>> Use the textbox.keypress event:
>>
>> LPARAMETERS nKeyCode, nShiftAltCtrl
>> IF nKeyCode = ASC('.')
>> NODEFAULT
>> KEYBOARD ','
>> ENDIF
>>
>> - Rush
>>
>
>
>

Re: Keyboard problems by Fred

Fred
Fri May 02 07:36:11 CDT 2008

Rather than using the KEYBOARD command from the KeyPress event, you should
do a DODEFAULT(nKeyCode, nShiftAltCtrl) with the changed codes you want to
see and a NODEFAULT to prevent the original keycodes from executing.

--
Fred
Microsoft Visual FoxPro MVP


"Rush Strong" <rpstrong@gmail.com> wrote in message
news:ir1Sj.2962$5X.2770@trndny08...
> WP wrote:
>> I work in Argentina, there you use the point to separate thousands and
>> the comma for the decimal places. So in VFP 9 I just use SET SYSFORMATS
>> ON, since the Windows settings are set to Spanish (Argentina).
>>
>> But there is one problem. On all keyboards that have Spanish or even
>> Argentine layouts, on the numeric keypad of the keyboard you have just
>> "." (point) and when you press down this key you get of course a point on
>> the screen but when in Fox you press it inside a numeric field you don't
>> get anything. You have to use then the comma in the left part of the
>> keyboard. How can I achieve to get on screen a comma when I press down
>> the point key on the numeric keypad
>
> Use the textbox.keypress event:
>
> LPARAMETERS nKeyCode, nShiftAltCtrl
> IF nKeyCode = ASC('.')
> NODEFAULT
> KEYBOARD ','
> ENDIF
>
> - Rush