CheckBox.CreateParams Property

Definition

Gets the required creation parameters when the control handle is created.

C#
protected override System.Windows.Forms.CreateParams CreateParams { get; }

Property Value

A CreateParams that contains the required creation parameters when the handle to the control is created.

Examples

The following code example extends the CreateParams property of a Button derived class. The CreateParams.Style property is changed, which causes the button to display an Icon rather than an Image. This example requires that you have a class that inherits from the Button class.

C#
protected override CreateParams CreateParams
{
    get
    {
        // Extend the CreateParams property of the Button class.
        CreateParams cp = base.CreateParams;
        // Update the button Style.
        cp.Style |= 0x00000040; // BS_ICON value

        return cp;
    }
}

Applies to

Product Versions
.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, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9