Control.GetNextControl(Control, Boolean) Control.GetNextControl(Control, Boolean) Control.GetNextControl(Control, Boolean) Control.GetNextControl(Control, Boolean) Method

定義

擷取子控制項定位順序中前後的下一個控制項。Retrieves the next control forward or back in the tab order of child controls.

public:
 System::Windows::Forms::Control ^ GetNextControl(System::Windows::Forms::Control ^ ctl, bool forward);
public System.Windows.Forms.Control GetNextControl (System.Windows.Forms.Control ctl, bool forward);
member this.GetNextControl : System.Windows.Forms.Control * bool -> System.Windows.Forms.Control
Public Function GetNextControl (ctl As Control, forward As Boolean) As Control

參數

ctl
Control Control Control Control

要做為搜尋起點的 ControlThe Control to start the search with.

forward
Boolean Boolean Boolean Boolean

true 表示在定位順序中向前搜尋。false 表示向後搜尋。true to search forward in the tab order; false to search backward.

傳回

定位順序中的下一個 ControlThe next Control in the tab order.

備註

GetNextControl方法取決於定位順序。The GetNextControl method is dependent on tab order. 若要逐一查看表單的所有控制項(包括嵌套控制項), Controls請使用屬性。To iterate through all controls of a form, including nested controls, use the Controls property. 若要取得或設定容器控制項的現用控制項,請使用ActiveControl屬性。To get or set the active control of a container control, use the ActiveControl property.

適用於

另請參閱