CheckBox::CreateParams Property

 

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

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

protected:
property CreateParams^ CreateParams {
	[SecurityPermissionAttribute(SecurityAction::LinkDemand, Flags = SecurityPermissionFlag::UnmanagedCode)]
	virtual CreateParams^ get() override;
}

Property Value

Type: System.Windows.Forms::CreateParams^

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

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.

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;
}

SecurityPermission

for operating with unmanaged code. Associated enumeration: UnmanagedCode

.NET Framework
Available since 1.1
Return to top
Show: