Arun
Arun

Reputation: 43

How to disable a particular key press in .NET?

I want to disable a particular key press in .NET(both VB.NET & C#.NET).``

Upvotes: 1

Views: 1169

Answers (2)

logicnp
logicnp

Reputation: 5836

If you want to disable for your own application only, You can also use IMessageFilter.

Upvotes: 0

Eric J.
Eric J.

Reputation: 150108

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.

Upvotes: 4

Related Questions