Form.IsRestrictedWindow Form.IsRestrictedWindow Form.IsRestrictedWindow Form.IsRestrictedWindow Property

定义

获取一个值,该值指示窗体是否可以不受限制地使用所有窗口和用户输入事件。Gets a value indicating whether the form can use all windows and user input events without restriction.

public:
 property bool IsRestrictedWindow { bool get(); };
[System.ComponentModel.Browsable(false)]
public bool IsRestrictedWindow { get; }
member this.IsRestrictedWindow : bool
Public ReadOnly Property IsRestrictedWindow As Boolean

属性值

如果窗体有限制,则为 true;否则为 falsetrue if the form has restrictions; otherwise, false. 默认值为 trueThe default is true.

注解

IsRestrictedWindow属性确定AllWindows是否授予权限。The IsRestrictedWindow property determines whether the AllWindows permission is granted. 此属性在运行时在窗体的构造函数中设置,在窗体的生存期内缓存。This property is set at run time in the form's constructor, and is cached for the lifetime of the form. Windows 窗体在部分信任环境中运行的应用程序无法避开此项检查,因为公共语言运行时确保始终在部分信任环境中调用父构造函数。Windows Forms applications running in partial trust cannot circumvent this check, as the common language runtime ensures that the parent constructor is always called in partial trust.

适用于