views:

209

answers:

2

i want to disable a particular key press in .net(both vb.net & c#.net). someone plz help!!!

+4  A: 

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.

Eric J.
k then how to hook keys???
arun
his links show you how.
James Deville
A: 

If you want to disable for your own application only, You can also use IMessageFilter. See http://msdn.microsoft.com/en-us/library/system.windows.forms.application.addmessagefilter.aspx

logicnp