Control::SelectNextControl Method (Control^, Boolean, Boolean, Boolean, Boolean)
Activates the next control.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
public: bool SelectNextControl( Control^ ctl, bool forward, bool tabStopOnly, bool nested, bool wrap )
true to move forward in the tab order; false to move backward in the tab order.
true to ignore the controls with the TabStop property set to false; otherwise, false.
true to include nested (children of child controls) child controls; otherwise, false.
true to continue searching from the first control in the tab order after the last control has been reached; otherwise, false.
Return ValueType: System::Boolean
true if a control was activated; otherwise, false.
The ControlStyles, it is contained in another control, and all its parent controls are both visible and enabled.method activates the next control in the tab order if the control's Selectable style bit is set to true in
The Windows Forms controls in the following list are not selectable. Controls derived from controls in the list will also not be selectable.
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 methods, or by setting the ContainerControl::ActiveControl property to the current form, focus events occur in the following order:
The following code exampleshows theActiveControl property gets the currently active control in the container control.method being used in a form that has some controls. Each time that you click the form, the next control is activated. The
The following code example shows the Button and some other controls. When you click the Button, the next control after the Button is activated. Notice that you have to get the parent of the Button control. Since Button is not a container, calling directly on the Button would not change the activation.method being used in a form that has a
Available since 1.1