Form.IsRestrictedWindow 屬性

定義

取得值,指出表單是否可以無限制地使用所有的視窗和使用者輸入事件。

C#
[System.ComponentModel.Browsable(false)]
public bool IsRestrictedWindow { get; }

屬性值

Boolean

如果表單有限制則為 true,否則為 false。 預設為 true

屬性

備註

屬性 IsRestrictedWindow 會判斷是否 AllWindows 授與許可權。 這個屬性是在表單建構函式的執行時間設定,而且會在表單的存留期內快取。 Windows Forms在部分信任中執行的應用程式無法規避這項檢查,因為 Common Language Runtime 可確保父建構函式一律在部分信任中呼叫。

適用於

產品 版本
.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