Control.SetTopLevel(Boolean) 方法
定義
將控制項設定為最上層控制項。Sets the control as the top-level control.
protected:
void SetTopLevel(bool value);
protected void SetTopLevel (bool value);
member this.SetTopLevel : bool -> unit
Protected Sub SetTopLevel (value As Boolean)
參數
- value
- Boolean
true
會將控制項設定為最上層控制項,否則為 false
。true
to set the control as the top-level control; otherwise, false
.
例外狀況
value
參數設定為 true
,而且控制項是 ActiveX 控制項。The value
parameter is set to true
and the control is an ActiveX control.
GetTopLevel() 傳回值不等於 value
參數,而且 Parent 屬性不是 null
。The GetTopLevel() return value is not equal to the value
parameter and the Parent property is not null
.
備註
如果您呼叫 Form 的 SetTopLevel 方法,並傳入 false
的值,直到您再次呼叫 SetTopLevel,並傳入 true
值,才看得到該表單。If you call the SetTopLevel method of a Form and pass in a value of false
, the form will not be visible until you call SetTopLevel again, passing in a value of true
.