Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Collate
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Visual FoxPro Beta
Titre:
Divers
Thread ID:
00933295
Message ID:
00933475
Vues:
27
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform