Export (0) Print
Expand All
Expand Minimize
0 out of 1 rated this helpful - Rate this topic

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

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.