I\'m creating a custom control derived from UserControl that I would like to set focus to.
The custom control contains a ComboBox control and I draw some strings bes
Hans is right, a UserControl will do everything it can to hand off focus to a child control, expect in this one sneaky case:
What this means is that with a little prep-work, the UserControl will begrudgingly accept focus. Try something to this effect:
var controls = this.Controls.Cast().ToList();
controls.ForEach(control => control.Enabled = false);
this.ActiveControl = null; //the UserControl will try to remember its ActiveControl
this.Focus();
controls.ForEach(control => control.Enabled = true);