protected override bool ProcessCmdKey(ref Message msg, Keys keyData) { switch (keyData) { case Keys.Tab: if (OnTabPressed != null) { var eArgs = new TabPressedEventArgs { Handled = false }; OnTabPressed(this, eArgs); if (eArgs.Handled) { return(true); } return(base.ProcessCmdKey(ref msg, keyData)); } return(base.ProcessCmdKey(ref msg, keyData)); default: return(base.ProcessCmdKey(ref msg, keyData)); } }