欢迎光临
我们一直在努力

如何切换中英文输入法及全角/半角?(原创)-数据库专栏,SQL Server

建站超值云服务器,限时71元/月

如何切换中英文输入法及全角/半角?

问题描述:

如何切换中英文输入法及全角/半角、中英文字符等?

解决方案:

一、声明外部函数:

 

function boolean immsimulatehotkey (unsignedlong hwnd,unsignedlong dwhotkeyid) library “imm32.dll”

function unsignedlong getkeyboardlayout (unsignedlong wlayout)library “user32.dll”

function boolean immisime(unsignedlong hklkeyboardlayout)library “imm32.dll”

 

 

二、在一个按钮里写:

 

long ll_hwnd

 

ll_hwnd = handle(sle_1)

if not immisime(getkeyboardlayout(0)) then

   immsimulatehotkey(ll_hwnd,16)

end if

 

immsimulatehotkey(ll_hwnd,17)

 

三、测试:运行后在text中先输入逗号,均为半角,再点按钮后再输入逗号,均为全角

赞(0)
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com 特别注意:本站所有转载文章言论不代表本站观点! 本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。未经允许不得转载:IDC资讯中心 » 如何切换中英文输入法及全角/半角?(原创)-数据库专栏,SQL Server
分享到: 更多 (0)

相关推荐

  • 暂无文章