如何在其他应用程序中设置窗口挂钩?使用C#

问题描述:

我想这样做:在应用程序中设置一个窗口挂钩,如cal.exe,IE,如果我按任意键,我的应用程序可以显示我通过message.show()按下了什么键;请使用C#请!我试图找到解决方案,但没有人可以帮助我,请告诉我代码,谢谢!我的英文可能很糟糕,所以不要在意

I want to do this:set a window hook in an application such as cal.exe、IE,and if I press any key,my application can show me what key I pressed by message.show();Using C# please!I try to find the solution,but no one can help me ,please show me the code,thanks!My English maybe very bad,so don't care

请参阅我最近的回答:如何设置其他应用程序中的窗口挂钩? [ ^ ]。



-SA
Please see my recent answer: How to set a window hook in other application?[^].

—SA