?? datawindow自動切換中英文輸入法.txt
字號:
datawindow自動切換中英文輸入法
//4個apihansu
function boolean ImmSimulateHotKey (ULong hWnd, ULong dwHotKeyID) library "IMM32.dll"
function boolean ImmIsIME(uLong hklKeyboardLayout) library "IMM32.DLL"
//取得當前鍵盤布局
function ulong GetKeyboardLayout(ulong dwLayout) LIBRARY "user32.dll"
//激活當前鍵盤布局
FUNCTION ulong ActivateKeyboardLayout(ulong HKL,ulong flags) LIBRARY "user32.dll"
//2個全局變量
//自動切換輸入法
ulong hklCurrent //鍵盤布局
ulong hwnd //窗口句柄
//////////////////////////////////////
//2個全局函數
//參數 ulong hwnd
//切換到英文輸入法:
hklCurrent = GetKeyboardLayout(0)//系統默認輸入法
if ImmIsIME(hklCurrent) then
ImmSimulateHotKey(hwnd,112)
ActivateKeyboardLayout(0,1)
end if
//參數 ulong hwnd
//切換到中文輸入法:
hklCurrent = GetKeyboardLayout(0) //系統默認輸入法
if not ImmIsIME(hklCurrent) then
ImmSimulateHotKey(hwnd,112)
ActivateKeyboardLayout(0,1)
end if
//引用datawindow itemfocuschanged event
hwnd = Handle(parent)
choose case dwo.name
case 'f_jh','c_xsrq'
gf_english(hwnd)
case else
gf_chinese(hwnd)
end choose
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -