Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Change key board layout
Message
From
23/06/2008 09:42:16
Reza Meamar
Homa Programming Group
Shiraz, Iran
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2008 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01325921
Message ID:
01326106
Views:
16
>How can I change the key board layout with codes,
>
>kpsukb = SPACE(8)
>DECLARE INTEGER  ;
>        GetKeyboardLayoutName IN  ;
>        user32.DLL STRING
>= getkeyboardlayoutname(kpsukb)
>DECLARE INTEGER  ;
>        ActivateKeyboardLayout IN  ;
>        user32.DLL INTEGER,  ;
>        INTEGER
>IF ATC("409", kpsukb) = 0
>     = activatekeyboardlayout(1,  ;
>       0)
>ENDIF
>I am doing with But it is working like a toggle. But i want change my keyboard which i want language. I want eng/arabic key boad(may be any number or sign for each key board.
>thanks

It is for Persian Languge, you can set it for Arabic.
PROCEDURE KEYMODE
PARAMETERS KeymodeInValue
If !Vartype(KeymodeInValue)=="C"
   Return .F.
EndIf
Do Case
Case "WINDOWS 5" $ Upper(OS())
   DECLARE LONG LoadKeyboardLayout IN WIN32API STRING pwszKLID,INTEGER Flags
   Do Case
   Case Upper(KeymodeInValue)='FA'
      lnRetCode = LoadKeyboardLayout('00000429', 1)
   Case Upper(KeymodeInValue)='EN'
      lnRetCode = LoadKeyboardLayout('00000409', 1)
   EndCase
Other
   Declare Integer ActivateKeyboardLayout In Win32Api Integer,Integer 
   Do Case
   Case Upper(KeymodeInValue)='FA'
      ActivateKeyboardLayout(1025,8)
   Case Upper(KeymodeInValue)='EN'
      ActivateKeyboardLayout(1033,0)
   EndCase
EndCase 
Previous
Reply
Map
View

Click here to load this message in the networking platform