I have to develop a tool for monitoring helpdesk agents. I can figure out how to capture keyboard events and mouse events; however I need to capture the control that emitted/consumed the event too. Is it possible to find that out?
我必须开发一个监控服务台代理的工具。我可以弄清楚如何捕获键盘事件和鼠标事件;但是我需要捕获发出/消耗事件的控件。是否有可能找到它?
2 个解决方案
#1
1
You need windows hooks to pick up the events. These are really the province of native code. Try asking again with Win32 tag replacing the C# tag.
你需要Windows钩子来接收事件。这些实际上是本机代码的一部分。尝试再次使用Win32标记替换C#标记。
#2
0
I used the code from Stephen Toub's blog to add a shortcut to my application in the system tray. The comments were quite useful as well.
我使用了Stephen Toub博客的代码在系统托盘中添加了应用程序的快捷方式。评论也非常有用。
#1
1
You need windows hooks to pick up the events. These are really the province of native code. Try asking again with Win32 tag replacing the C# tag.
你需要Windows钩子来接收事件。这些实际上是本机代码的一部分。尝试再次使用Win32标记替换C#标记。
#2
0
I used the code from Stephen Toub's blog to add a shortcut to my application in the system tray. The comments were quite useful as well.
我使用了Stephen Toub博客的代码在系统托盘中添加了应用程序的快捷方式。评论也非常有用。