This documentation is archived and is not being maintained.
Control.SelectNextControl Method
.NET Framework 1.1
Activates the next control.
[Visual Basic] Public Function SelectNextControl( _ ByVal ctl As Control, _ ByVal forward As Boolean, _ ByVal tabStopOnly As Boolean, _ ByVal nested As Boolean, _ ByVal wrap As Boolean _ ) As Boolean [C#] public bool SelectNextControl( Control ctl, bool forward, bool tabStopOnly, bool nested, bool wrap ); [C++] public: bool SelectNextControl( Control* ctl, bool forward, bool tabStopOnly, bool nested, bool wrap ); [JScript] public function SelectNextControl( ctl : Control, forward : Boolean, tabStopOnly : Boolean, nested : Boolean, wrap : Boolean ) : Boolean;
Parameters
- ctl
- The Control at which to start the search.
- forward
- true to move forward in the tab order; false to move backward in the tab order.
- tabStopOnly
- true to ignore the controls with the TabStop property set to false; otherwise, false.
- nested
- true to include nested (children of child controls) child controls; otherwise, false.
- wrap
- true to continue searching from the first control in the tab order after the last control has been reached; otherwise, false.
Return Value
true if a control was activated; otherwise, false.
Remarks
The SelectNextControl method activates the next control in the tab order if the control's ControlStyles.Selectable style bit set to true, 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)
Requirements
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family
See Also
Control Class | Control Members | System.Windows.Forms Namespace | Select | Focus
Show: