I have a dialog with user controls and is trying to set the control second in line in the tab order to be the starting tab. I.e. when the form is activated the focused control is not actually the one with lowest tab order.
I tried to set this in the constructor using
this.SelectNextControl(this.ActiveControl, true, true, true, false);
but ‘this.ActiveControl’ is null at that time.
anyone got ideas?
Try that in the
Shownevent. This event is invoked as the window is actually shown – at that point, all focussing is already done, all controls have been created and the form is ready. This may not be the case in constructor orLoad.