Home > Archive > FoxPro Help and Support > April 2006 > Keyboard Language









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Keyboard Language
vfpDev@hotmail.com

2006-04-07, 7:43 am

How can I change the language of the keyboard from VFP?

thanks

Jan Bucek

2006-04-07, 7:43 am

vfpDev@hotmail.com napsal(a):
> How can I change the language of the keyboard from VFP?
>
> thanks
>

FUNCTION ActivateKeyboard(pcL
N)
* pcLN char code: LayoutName - see FoxPro.H (CZ: 05, ENG: 09 ...)
* returns .T. if O.K., .F. if requested LayoutName not installed
local xcLN, xcLangCode, xcOriginLC
pcLN=iif(empty(pcLN)
, [09], pcLN) && default ENG

DECLARE INTEGER GetKeyboardLayoutNam
e IN WIN32API STRING @
DECLARE INTEGER ActivateKeyboardLayo
ut IN WIN32API INTEGER, INTEGER

xcLN=SPACE(9)
GetKeyboardLayoutNam
e(@xcLN)
xcLangCode=substr(xc
LN, 7, 2)
xcOriginLC=xcLangCod
e

IF xcLangCode==pcLN && set, do nothing
RETURN .T.
ENDIF
ActivateKeyboardLayo
ut(0, 1) && set another LN
GetKeyboardLayoutNam
e(@xcLN)
xcLangCode=substr(xc
LN, 7, 2)
DO WHILE xcLangCode <> xcOriginLC
IF xcLangCode==pcLN && requested LN, end
RETURN .T.
ENDIF
ActivateKeyboardLayo
ut(0, 1) && set next LN
GetKeyboardLayoutNam
e(@xcLN)
xcLangCode=substr(xc
LN, 7, 2)
ENDDO
RETURN .F.
Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com