Dear all,
Please show me the way to solve a problem following : I have a MyClass class derived from UserControl class, I aslo override OnKeyDown method in the class. But the method works incorrectly(at least in my opinion), with many keys the KeyDown event is raised(a, b, c, ... key) but with many keys as Tab, Left, Right, ... the KeyDown event is not raised. Please show me the way to raise KeyDown event with Tab, Left... key(I must use the class derived from UserControl class, I use C# language and VS 2005).
Thanks you very much and best regard.
Ka.
Loading
le kaPosted Jul 8, 2007, 10:53 PM
Jan MontanoPosted Jul 6, 2007, 6:32 AM
You must override the IsInputKey method instead to trap those keys.
Add this to your class:
//Determines whether the specified key is a regular input key or a special key that requires preprocessing.
protected override bool IsInputKey(Keys keyData){ }
You could check the value like this if (keyData == Keys.Tab)
http://www.thescripts.com/forum/thread267085.html