Control.GetNextControl(Control, Boolean) 方法
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
擷取子控制項定位順序中前後的下一個控制項。
public:
System::Windows::Forms::Control ^ GetNextControl(System::Windows::Forms::Control ^ ctl, bool forward);
C#
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
- forward
- Boolean
true
表示在定位順序中向前搜尋。false
表示向後搜尋。
定位順序中的下一個 Control。
方法 GetNextControl 相依于定位順序。 若要逐一查看表單的所有控制項,包括巢狀控制項,請使用 Controls 屬性。 若要取得或設定容器控制項的作用中控制項,請使用 ActiveControl 屬性。
產品 | 版本 |
---|---|
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8 |
Windows Desktop | 3.0, 3.1, 5, 6, 7 |