CheckBox.CreateParams 属性

获取创建控件句柄时所需要的创建参数。

**命名空间:**System.Windows.Forms
**程序集:**System.Windows.Forms(在 system.windows.forms.dll 中)

语法

声明
Protected Overrides ReadOnly Property CreateParams As CreateParams
用法
Dim value As CreateParams

value = Me.CreateParams
protected override CreateParams CreateParams { get; }
protected:
virtual property CreateParams^ CreateParams {
    CreateParams^ get () override;
}
/** @property */
protected CreateParams get_CreateParams ()
protected override function get CreateParams () : CreateParams

属性值

CreateParams,包含创建控件的句柄时所需的创建参数。

示例

下面的代码示例扩展 Button 派生类的 CreateParams 属性。CreateParams.Style 属性被更改,这将使该按钮显示 Icon 而不是 Image。此示例要求您有从 Button 类继承的类。

/** @property 
 */
protected CreateParams get_CreateParams()
{
    // Extend the CreateParams property of the Button class.
    CreateParams cp = super.get_CreateParams();

    // Update the button Style.
    cp.set_Style(cp.get_Style() | 0x40); // BS_ICON value
    return cp;
} //get_CreateParams

.NET Framework 安全性

平台

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

请参见

参考

CheckBox 类
CheckBox 成员
System.Windows.Forms 命名空间