共用方式為


Control.GetNextControl(Control, Boolean) 方法

定義

以子控制項的制表順序,向前或往後取下一個控制項。

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);
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 開始搜尋。

forward
Boolean

true 在制表序列中向前搜尋; false 回頭尋找。

傳回

下一張是指法譜順序中的。Control

備註

GetNextControl 方法依賴於制表序列。 要遍歷表單的所有控制項,包括巢狀控制項,請使用該 Controls 屬性。 要取得或設定容器控制的主動控制,請使用該 ActiveControl 屬性。

適用於

另請參閱