CheckBox.CreateParams Özellik

Tanım

Denetim tutamacı oluşturulduğunda gerekli oluşturma parametrelerini alır.

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

Özellik Değeri

CreateParams

CreateParams Denetimin tanıtıcısı oluşturulduğunda gerekli oluşturma parametrelerini içeren bir.

Örnekler

Aşağıdaki kod örneği türetilmiş bir Button sınıfın özelliğini genişletirCreateParams. CreateParams.Style özelliği değiştirilir ve bu da düğmenin yerine Imageöğesini Icon görüntülemesine neden olur. Bu örnek, sınıfından devralan Button bir sınıfınız olmasını gerektirir.

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

Şunlara uygulanır