Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Collate
Message
 
To
15/08/2004 03:50:40
General information
Forum:
Visual FoxPro
Category:
Visual FoxPro Beta
Title:
Miscellaneous
Thread ID:
00933295
Message ID:
00933475
Views:
28
>I want to ask if i have many textboxses ,i want write arabic in the textbox3
at my form without use (right)ctrl+alt+shift),and compleate other textboxses english language,
i mean can i change somthing at properties for textbox.to write arabic directly language as
access (at properties language you can see ...sytsem,arabic,hindi...)

You can use API function to control the keyboard. Save the following function in your function library or in a prg file.
PROCEDURE SetKeyboard
 LPARAMETER lcKeyboardcode
 IF VARTYPE(lcKeyboardcode)<>'C'
      RETURN
 ENDIF
 IF EMPTY(lcKeyboardcode)
      RETURN
 ENDIF
 LOCAL pwSzklid
 pwSzklid = SPACE(8)
 DECLARE INTEGER GetKeyboardLayoutName IN user32.DLL STRING @
 geTkeyboardlayoutname(@pwSzklid)
 DECLARE INTEGER ActivateKeyboardLayout IN user32.DLL INTEGER, INTEGER
 IF ATC(lcKeyboardcode, pwSzklid)=0
      acTivatekeyboardlayout(1,0)
 ENDIF
 RETURN
ENDPROC
How to use it
Use the following command in your form's init method or in main.prg
Set procedure to YourFunctionLibrary && Where the function is stored
Now in GotFocus of your Arabic textbox call the above function like this
SetKeyboard('401')
To switch it back to English use it like this in the GotFocus of English textbox
SetKeyboard('409')
If you want your application start with Arabic keyboard then you can use it to your main.prg.

Anyway I hope it will help you.
Regards,
Zaheer
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform