怎样在PB中转换中英文输入法数-数据库专栏,其他相关
来源:作者: 发布时间:2007-12-26 02:02:28

怎样在pb中转换中英文输入法数
函数声明:
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"
脚本如下:
constant int ime_thotkey_ime_nonime_toggle=112
ulong hklcurrent
ulong hnd
//转换到英文输入法
hklcurrent=getkeyboardlayout(0)
if immisime(hklcurrent) then
hnd=handle(parent)
immsimulatehotkey(hnd,ime_thotkey_ime_nonime_toggle)
end if
//转换到中文输入法
hklcurrent=getkeyboardlayout(0)
if not immisime(hklcurrent) then
hnd=handle(parent)
immsimulatehotkey(hnd,ime_thotkey_ime_nonime_toggle)
end if
|
还没有关于此文章的相关评论!