Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Activatekeyboardlayout
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00842573
Message ID:
00842830
Views:
36
Hi Mr. Reza
I am using the same function in the my function library (arfunc.prg) in following way
FUNCTION SetKeyboard(lcKeyboardCode)
	IF VARTYPE(lcKeyboardCode)!='C'
		RETURN
	ENDIF
	IF EMPTY(lcKeyboardCode)
		RETURN
	ENDIF 
	LOCAL pwszKLID 
	pwszKLID = SPACE(8)
	DECLARE INTEGER GetKeyboardLayoutName IN user32.DLL STRING @pwszKLID
	GetKeyboardLayoutName(@pwszKLID)
	DECLARE INTEGER ActivateKeyboardLayout IN user32.DLL INTEGER HKL , INTEGER flags
	IF ATC(lcKeyboardCode,pwszKLID) = 0
		ActivateKeyboardLayout(1,0)
	ENDIF
RETURN
To use it in the application
SET PROCEDURE TO arfunc.prg additive

setkeyboard('401') && for Arabic keyboard
setkeyboard('409') && for English keyboad
With best regards,
Zaheer
Previous
Reply
Map
View

Click here to load this message in the networking platform