VFP的IMESTATUS()适用XP,之后的windows版本可能不适用。
可以试试用WinAPI切换输入法,如:
DECLARE LONG GetKeyboardLayout IN User32 LONG
DECLARE LONG LoadKeyboardLayout IN User32 STRING@, LONG
DECLARE LONG ActivateKeyboardLayout IN User32 LONG,LONG
hLayout = GetKeyboardLayout(0)
?"切换为En输入法"
LoadKeyboardLayout("0x0409", 1) && KLF_ACTIVATE
?"按一键恢复原输入法"
INKEY(0)
ActivateKeyboardLayout(hLayout, 0)