ColorDialog.Instance 属性
此属性支持 .NET 基础结构,但不适合在代码中直接使用。
获取基础窗口实例句柄(HINSTANCE)。
**命名空间:**System.Windows.Forms
**程序集:**System.Windows.Forms(在 system.windows.forms.dll 中)
语法
声明
Protected Overridable ReadOnly Property Instance As IntPtr
用法
Dim value As IntPtr
value = Me.Instance
protected virtual IntPtr Instance { get; }
protected:
virtual property IntPtr Instance {
IntPtr get ();
}
/** @property */
protected IntPtr get_Instance ()
protected function get Instance () : IntPtr
属性值
包含窗口句柄的 HINSTANCE 值的 IntPtr。
备注
提示
此方法使用 SecurityAction.LinkDemand 防止不可信代码对它进行调用;只有直接调用方才需要具有 SecurityPermissionAttribute.UnmanagedCode 权限。如果您的代码可从部分受信任的代码调用,则未经验证不要将用户输入传递给 Marshal 类方法。有关使用 LinkDemand 成员的重要限制,请参见 Demand 和 LinkDemand。
该属性还使用 SecurityAction.InheritanceDemand 安全属性;要重写该成员,派生类必须具有 CustomPermission 权限。
.NET Framework 安全性
- SecurityPermission 用于操作非托管代码。关联的枚举:SecurityPermissionFlag.UnmanagedCode
平台
Windows 98、Windows 2000 SP4、Windows CE、Windows Millennium Edition、Windows Mobile for Pocket PC、Windows Mobile for Smartphone、Windows Server 2003、Windows XP Media Center Edition、Windows XP Professional x64 Edition、Windows XP SP2、Windows XP Starter Edition
.NET Framework 并不是对每个平台的所有版本都提供支持。有关受支持版本的列表,请参见系统要求。
版本信息
.NET Framework
受以下版本支持:2.0、1.1、1.0