System.Windows.Forms.Control.GetNextControl Method

Retrieves the next control forward or back in the tab order of child controls.

Syntax

public Control GetNextControl (Control ctl, bool forward)

Parameters

ctl
The System.Windows.Forms.Control to start the search with.
forward
true to search forward in the tab order; false to search backward.

Returns

The next System.Windows.Forms.Control in the tab order.

Remarks

The Control.GetNextControl(Control, bool) method is dependent on tab order. To iterate through all controls of a form, including nested controls, use the Control.Controls property. To get or set the active control of a container control, use the ContainerControl.ActiveControl property.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0