Control.SelectNextControl Method
This page is specific to:.NET Framework Version:1.12.03.03.54.0
.NET Framework Class Library
Control.SelectNextControl Method

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.

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

© 2009 Microsoft Corporation. All rights reserved.   Terms of Use | Trademarks | Privacy Statement
Page view tracker
Rate the Lightweight library
x
Lightweight builds on ScriptFree (loband) by adding features you've requested: a SearchBox and default code language selection.
Do you like the SearchBox?
Do you like the tabbed code blocks?
How useful is this topic?
Tell us more.
Thanks
x
You're helping to improve MSDN Online.
Feedback
Switch View
Classic
Lightweight Beta
ScriptFree
Switch View