CheckBox.CreateParams Propiedad

Definición

Obtiene los parámetros de creación necesarios cuando se crea el identificador del control.

protected:
 virtual property System::Windows::Forms::CreateParams ^ CreateParams { System::Windows::Forms::CreateParams ^ get(); };
protected override System.Windows.Forms.CreateParams CreateParams { get; }
member this.CreateParams : System.Windows.Forms.CreateParams
Protected Overrides ReadOnly Property CreateParams As CreateParams

Valor de propiedad

CreateParams

CreateParams que contiene los parámetros de creación necesarios cuando se crea el identificador del control.

Ejemplos

En el ejemplo de código siguiente se extiende la CreateParams propiedad de una Button clase derivada. La CreateParams.Style propiedad se cambia, lo que hace que el botón muestre un en Icon lugar de .Image Este ejemplo requiere que tenga una clase que herede de la Button clase .

virtual System::Windows::Forms::CreateParams^ get() override
{
   
   // Extend the CreateParams property of the Button class.
   System::Windows::Forms::CreateParams^ cp = __super::CreateParams;

   // Update the button Style.
   cp->Style |= 0x00000040; // BS_ICON value
   return cp;
}
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;
    }
}

Protected Overrides ReadOnly Property CreateParams() As System.Windows.Forms.CreateParams
    Get
        Dim SecPerm As New SecurityPermission(SecurityPermissionFlag.UnmanagedCode)
        SecPerm.Demand()

        ' Extend the CreateParams property of the Button class.
        Dim cp As System.Windows.Forms.CreateParams = MyBase.CreateParams
        ' Update the button Style.
        cp.Style = cp.Style Or &H40 ' BS_ICON value

        Return cp
    End Get
End Property

Se aplica a