protected Control FindFocusedChild() { if (this.Controls.Count == 0) { return null; } foreach (Control control in this.Controls) { if (control.ContainsFocus) { return control; } } return null; }