TextBoxHundreds.KeyDown += new System.Windows.Forms.KeyEventHandler(this.SendTabonEnter); private void SendTabonEnter(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Return) { SendKeys.Send("{TAB}"); } }I've been trying to create a custom textbox control that has the behavior built in, with no success.
public class WSGTextbox : TextBox { protected override void OnKeyDown(KeyEventArgs e) { if (e.KeyCode == Keys.Return) { SendKeys.Send("{TAB}"); } e.Handled = true; // to Call the implementation in the base TextBox class, // which raises the KeyPress event. base.OnKeyDown(e); } }Any ideas?