Setting Focus to a .NET UserControl…?
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 beside it. The ComboBox can receive focus, but I would like to be able to set focus to the UserControl itself. My OnPaint handler is set up to draw the control slightly differently if it has focus but I call CanFocus() from the parent form when I create my custom control and it returns false. Is there a property or something to set? Hans Passant UserControl will fight you tooth and nail to avoid getting the focus. It has code that