Activates the next control.
Public Function SelectNextControl ( _ ctl As Control, _ forward As Boolean, _ tabStopOnly As Boolean, _ nested As Boolean, _ wrap As Boolean _ ) As Boolean
Dim instance As Control Dim ctl As Control Dim forward As Boolean Dim tabStopOnly As Boolean Dim nested As Boolean Dim wrap As Boolean Dim returnValue As Boolean returnValue = instance.SelectNextControl(ctl, _ forward, tabStopOnly, nested, wrap)
public bool SelectNextControl( Control ctl, bool forward, bool tabStopOnly, bool nested, bool wrap )
public: bool SelectNextControl( Control^ ctl, bool forward, bool tabStopOnly, bool nested, bool wrap )
public function SelectNextControl( ctl : Control, forward : boolean, tabStopOnly : boolean, nested : boolean, wrap : boolean ) : boolean
The SelectNextControl method activates the next control in the tab order if the control's Selectable style bit is set to true in ControlStyles, it is contained in another control, and all its parent controls are both visible and enabled.
The Windows Forms controls in the following list are not selectable. Controls derived from controls in the list will also not be selectable.
Label
Panel
GroupBox
PictureBox
ProgressBar
Splitter
LinkLabel (when there is no link present in the control)
When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), by calling the Select or SelectNextControl methods, or by setting the ContainerControl..::.ActiveControl property to the current form, focus events occur in the following order:
Enter
GotFocus
Leave
Validating
Validated
LostFocus
If the CausesValidation property is set to false, the Validating and Validated events are suppressed.
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98, Windows CE, Windows Mobile for Smartphone, Windows Mobile for Pocket PC