.版本 2
.局部变量 count, 整数型
.局部变量 i, 整数型
.局部变量 handle, 整数型, , "0"
.局部变量 name, 文本型
count = GetKeyboardLayoutList (0, handle)
重定义数组 (handle, 假, count)
GetKeyboardLayoutList (count, handle)
name = 取空白文本 (512)
.计次循环首 (count, i)
ImmGetDescriptionA (handle [i], name, 512)
.如果真 (name = “英语(美国)”)
ActivateKeyboardLayout (handle [i], 0)
跳出循环 ()
信息框 (“成功设置输入法为英语(美国)”, 0, , )
.如果真结束
.计次循环尾 ()
.版本 2
.DLL命令 GetKeyboardLayoutList, 整数型, , "GetKeyboardLayoutList"
.参数 nBuff, 整数型
.参数 lpList, 整数型, 传址 数组
.DLL命令 ImmGetDescriptionA, 整数型, "imm32.dll", "ImmGetDescriptionA"
.参数 hkl, 整数型
.参数 lpsz, 文本型
.参数 uBuflen, 整数型
.DLL命令 ActivateKeyboardLayout, 整数型, , "ActivateKeyboardLayout"
.参数 hkl, 整数型
.参数 flags, 整数型
|