Export (0) Print
Expand All
Expand Minimize

Control.CreateParams Property

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

[Visual Basic]
Protected Overridable ReadOnly Property CreateParams As _
   CreateParams
[C#]
protected virtual CreateParams CreateParams {get;}
[C++]
protected: __property virtual CreateParams* get_CreateParams();
[JScript]
protected function get CreateParams() : CreateParams;

Property Value

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

Remarks

The CreateParams property should not be overridden and used to adjust the properties of your derived control. Properties such as the CreateParams.Caption, CreateParams.Width, and CreateParams.Height should be set by the corresponding properties in your control such as Control.Text, Control.Width and Control.Height. The CreateParams object should only be extended when you are wrapping a standard Windows control class or to set styles not provided by the Windows Forms namespace. For more information about creating control parameters, see the CreateWindow and CreateWindowEx functions and the CREATESTRUCT structure documentation in the Windows Platform SDK reference located in the MSDN Library.

Notes to Inheritors:  When overriding the CreateParams property in a derived class, use the base class's CreateParams property to extend the base implementation. Otherwise, you must provide all the implementation.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

.NET Framework Security: 

See Also

Control Class | Control Members | System.Windows.Forms Namespace | CreateParams

Show:
© 2014 Microsoft