Re: Keyboard Language
- From: Jan Bucek <bucek.jan@xxxxxxx>
- Date: Fri, 07 Apr 2006 12:26:59 +0200
vfpDev@xxxxxxxxxxx napsal(a):
How can I change the language of the keyboard from VFP?FUNCTION ActivateKeyboard(pcLN)
thanks
* 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 GetKeyboardLayoutName IN WIN32API STRING @
DECLARE INTEGER ActivateKeyboardLayout IN WIN32API INTEGER, INTEGER
xcLN=SPACE(9)
GetKeyboardLayoutName(@xcLN)
xcLangCode=substr(xcLN, 7, 2)
xcOriginLC=xcLangCode
IF xcLangCode==pcLN && set, do nothing
RETURN .T.
ENDIF
ActivateKeyboardLayout(0, 1) && set another LN
GetKeyboardLayoutName(@xcLN)
xcLangCode=substr(xcLN, 7, 2)
DO WHILE xcLangCode <> xcOriginLC
IF xcLangCode==pcLN && requested LN, end
RETURN .T.
ENDIF
ActivateKeyboardLayout(0, 1) && set next LN
GetKeyboardLayoutName(@xcLN)
xcLangCode=substr(xcLN, 7, 2)
ENDDO
RETURN .F.
.
- Prev by Date: Re: Runtime files
- Next by Date: Re: Font Name in Report
- Previous by thread: Re: Runtime files
- Next by thread: Re: Keyboard Language
- Index(es):
Relevant Pages
|