$INCLUDE "RAPIDQ.INC"
DECLARE FUNCTION ActivateKeyboardLayout LIB "user32" ALIAS _
"ActivateKeyboardLayout" (BYVAL HKL AS LONG, BYVAL flags AS LONG) AS LONG
DECLARE FUNCTION LoadKeyboardLayout LIB "user32" ALIAS _
"LoadKeyboardLayoutA" (BYVAL pwszKLID AS STRING, BYVAL flags AS LONG) AS LONG
Private CONST KLF_ACTIVATE = 1
DEFINT OldRow
DECLARE SUB RichEditChange(Key AS BYTE)
DECLARE SUB Button1Click
DECLARE SUB Button2Click
DECLARE SUB Button3Click
CREATE Form AS QFORM
center
Width=600
Height =450
CREATE RichEdit AS QEDIT
Width=400
Height =300
END CREATE
CREATE Button1 AS QBUTTON
CAPTION = "Russian"
Left = 450
Top = 140
Width = 88
Height = 33
OnClick = Button1Click
END CREATE
CREATE Button2 AS QBUTTON
CAPTION = "English"
Left = 450
Top = 200
Width = 88
Height = 33
OnClick = Button2Click
END CREATE
END CREATE
Form.SHOWMODAL
SUB Button1Click
LoadKeyboardLayout "00000419", KLF_ACTIVATE
END SUB
SUB Button2Click
LoadKeyboardLayout "00000409", KLF_ACTIVATE
END SUB
SUB Button3Click
LoadKeyboardLayout "00000412", KLF_ACTIVATE
END SUB
|