您的位置:首页 > 移动开发

Keyboard event handling in .NET applications by Alfred Mirzagitov

2012-07-14 20:34 316 查看
在做智能监控系统时,需要用红外遥控器来操作系统功能,而红外遥控器的SDK提供了将遥控器按键信号转换成电脑键盘按键的功能。

下面的文章就实现了应用程序中的键盘处理功能

This article shows several different techniques for handling .NET keyboard events in an application

Whenever a new tool comes out, if it has something to do with building user interfaces, one of the very first questions asked is how to intercept and handle keyboard and mouse events. Experience also shows that the most of the confusion is caused by certain keys, such as the TAB, RETURN, ESCAPE, and ARROW keys rather than character keys since these are usually handled automatically by the OS or the framework.

This article will walk you through several steps of different complexity and show you how to intercept and handle keystrokes at the form level or at the application level. We will be mostly talking about keyboard keystrokes, although we shall mention mouse events. Mouse event handling is somewhat similar to keyboard events, but at the same time it probably could make a big article of its own.

出处:http://edn.embarcadero.com/article/30129
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: