简体   繁体   English

如何使用c#获取窗口的句柄并禁用键盘输入?

[英]How to Get handle of a window and disable the Keyboard inputs using c#?

如何使用c#获取窗口的句柄并禁用键盘输入?

To prevent keyboard input in a window in another process, you need to make a keyboard hook . 为了防止键盘在另一个进程中输入到窗口中,您需要制作一个键盘钩
You can then check GetForegroundWindow() and suppress the input. 然后,您可以检查GetForegroundWindow()并取消输入。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM