Quote Originally Posted by jmcilhinney View Post
This is from that blog post:What exactly is it that you do not understand about that?
what you have quoted here sir, honestly i am not picking them up. its still not clear at all to me, that what is actually key down event, and diff b/w key down and key press.

things i did not understand in your blog are

When the user presses a key on the keyboard, active WinForms controls raise multiple events. In the order they are raised, those events are PreviewKeyDown, KeyDown, KeyPress and KeyUp. Following is an explanation of when and how to use each one.

The first event raised by a control is the PreviewKeyDown event. As with all events raised by the Framework, the data for the event is provided by the e parameter; in this case, a PreviewKeyDownEventsArgs object. The purpose of this event is basically the IsInputKey property of that object.

The PreviewKeyDown event was added to the .NET Framework in version 2.0. Prior to that, the only way to specify whether a key is a regular input key or not was to derive your own custom control and override the IsInputKey method. With the addition of the PreviewKeyDown event, we can now handle it for a standard control and specify whether or not the key that was depressed is a regular input key. This way we can more easily provide one-off custom behaviour. For more information on treating a key as a regular input key, consult the MSDN documentation for the Control.IsInputKey method.