Can someone help with the correct syntax for overriding the Keydown event of a textbox control? I'm having a heck of time getting it to compile. (Yup,..it's friday.) Thanks in advance.
PePe
public class cTextBox: System.Windows.Forms.TextBox
{
public cTextBox()
{
base.KeyDown += new System.EventHandler(OnKeyDown);
}
protected override void OnKeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
{
//trap escape key here.
}
}
PePe
public class cTextBox: System.Windows.Forms.TextBox
{
public cTextBox()
{
base.KeyDown += new System.EventHandler(OnKeyDown);
}
protected override void OnKeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
{
//trap escape key here.
}
}