简体   繁体   中英

How to disable a particular key press in .NET?

我想禁用.NET(VB.NET和C#.NET)中的特定按键。

You can disable a key globally (for all applications) by writing a Global Key Hook , or just within your application using a Local Key Hook .

Once you have hooked the incoming keys, you can ignore particular ones and not pass them on to windows / to the application.

如果只想为自己的应用程序禁用,则还可以使用IMessageFilter

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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