检测虚拟键盘的texbox焦点 [英] Detect texbox focus for virtual keyboard

查看:86
本文介绍了检测虚拟键盘的texbox焦点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在Windows(XP,Vista,7)上开发通用的屏幕键盘.我需要检测用户何时将焦点放在文本框上以自动显示键盘,并在文本框失去焦点时将其隐藏.

无论如何,我能做到这一点吗? (文本框来自我没有代码的其他应用程序.我正在寻找一种适用于大多数通用应用程序的解决方案.)

感谢您的帮助或指点.

I''m developing a generic on-screen keyboard in Windows (XP, Vista, 7). I need to detect when the user has focused on a textbox to automatically show the keyboard, and hide it when textbox loses focus.

Is there anyway I can achieve this? (The textbox is from other applications that I do not have codes for. I''m looking for a solution that can work for most generic applications).

Thanks for any help or pointers.

推荐答案

请仔细阅读,可能会对您有所帮助

http://www.pinvoke.net/default.aspx/user32/FindWindow.htm [ ^ ]
Go through this , this may helps you

http://www.pinvoke.net/default.aspx/user32/FindWindow.htm[^]


希望实现系统范围的挂钩函数.
Look at implementing a system-wide hook function.


这篇关于检测虚拟键盘的texbox焦点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆