我下一一段代码 但是不管用 dll都是有的
①定义API:
function boolean ImmSimulateHotKey (ULong hWnd, ULong dwHotKeyID) library "IMM32.dll"
function ulong GetKeyboardLayout(ulong dwLayout) LIBRARY "user32.dll"
function boolean ImmIsIME(uLong hklKeyboardLayout) library "IMM32.DLL"
②脚本:
ulong hklCurrent
ulong hnd
//切换到英文输入法
hklCurrent=GetKeyboardLayout(0)
if ImmIsIME(hklCurrent) then
hnd=Handle(parent)
ImmSimulateHotKey(hnd,112)
end if
//切换到中文输入法
hklCurrent=GetKeyboardLayout(0)
if not ImmIsIME(hklCurrent) then
hnd=Handle(parent)
ImmSimulateHotKey(hnd,112)
end if
各位前辈,有没有能用的给发一下啊,感激不尽
------解决方案--------------------