System.Windows.Forms
1.0.5000.0
2.0.0.0
System.Windows.Forms.Control
You do not typically inherit from . To create your own button class, inherit from the , , or class.
To have the derived button control display an image, set the property or the and properties. The image can be aligned on the button control by setting the property. Likewise, to align the displayed on the button control, set the property.
The property determines the style and appearance of the control. If the property is set to , the user's operating system determines the appearance of the control.
Implements the basic functionality common to button controls.
Constructor
To be added.
Initializes a new instance of the class.
1.0.5000.0
2.0.0.0
Property
2.0.0.0
System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Always)
System.ComponentModel.DefaultValue(false)
System.ComponentModel.Browsable(true)
System.Boolean
To be added.
Set to true to display text that extends beyond the width of the control when the user passes over the control with the mouse. You must set the control's AutoSize property to false if you want to be true. If AutoSize is true, the control will grow to fit the text and an ellipsis will not appear.
Gets or sets a value indicating whether the ellipsis character (...) appears at the right edge of the control, denoting that the control text extends beyond the specified length of the control.
Property
2.0.0.0
System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Visible)
System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Always)
System.ComponentModel.Browsable(true)
System.Boolean
To be added.
To be added.
Gets or sets a value that indicates whether the control resizes based on its contents.
Event
2.0.0.0
System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Always)
System.ComponentModel.Browsable(true)
System.EventHandler
For more information about handling events, see Consuming Events.
Occurs when the value of the property changes.
Property
1.0.5000.0
2.0.0.0
System.Drawing.Color
To be added.
To be added.
Gets or sets the background color of the control.
Method
System.Windows.Forms.AccessibleObject
To be added.
To be added.
To be added.
1.0.5000.0
2.0.0.0
Property
System.Windows.Forms.CreateParams
To be added.
To be added.
To be added.
1.0.5000.0
2.0.0.0
Property
System.Windows.Forms.ImeMode
To be added.
As implemented in the class, this property always returns the Disable value of .
Gets the default Input Method Editor (IME) mode supported by this control.
1.0.5000.0
2.0.0.0
Property
System.Drawing.Size
To be added.
To be added.
To be added.
1.0.5000.0
2.0.0.0
Method
System.Void
This method is called by the public Dispose method and the method. Dispose invokes the protected Dispose(Boolean) method with the parameter set to true. invokes Dispose with set to false.
When the parameter is true, this method releases all resources held by any managed objects that this references. This method invokes the Dispose method of each referenced object.
Releases the unmanaged resources used by the and optionally releases the managed resources.
true to release both managed and unmanaged resources; false to release only unmanaged resources.
1.0.5000.0
2.0.0.0
Property
System.ComponentModel.Browsable(true)
System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)
System.Windows.Forms.FlatButtonAppearance
To be added.
Use the property only with controls whose is .
Gets the appearance of the border and the colors used to indicate check state and mouse state.
2.0.0.0
Property
System.ComponentModel.DefaultValue(System.Windows.Forms.FlatStyle.Standard)
System.ComponentModel.Localizable(true)
System.Windows.Forms.FlatStyle
To be added.
When the property of the and classes is set to System, the control is drawn by the user's operating system and the check alignment is based upon the CheckAlign and property values. The CheckAlign property value is not changed, but the appearance of the control can be affected. The check box is horizontally aligned with either the left or right edge of the control (a left or center alignment appears left aligned, right remains unchanged), and vertically aligned the same as the descriptive text. For example, if you have a control with a CheckAlign property value of ContentAlignment. MiddleCenter, a property value of ContentAlignment.TopRight, and the property value is set to System, the check box alignment will appear to be ContentAlignment.TopLeft while the text alignment remains unchanged.
If the property is set to FlatStyle.System, any images assigned to the property are not displayed.
Gets or sets the flat style appearance of the button control.
1.0.5000.0
2.0.0.0
Method
2.0.0.0
System.Drawing.Size
The behavior of differs by control. The might be unable to assign the returned size to the control. You can return a size larger than the constraints indicated in the parameter, but should decrease as the constraint decreases. For example, GetPreferredSize(new Size(100, 0)) should not be wider than GetPreferredSize(new Size(200, 0)). The exception is a of 0 or Size.Empty, which are defined as unconstrained.
Retrieves the size of a rectangular area into which a control can be fitted.
An ordered pair of type representing the width and height of a rectangle.
The custom-sized area for a control.
Property
System.ComponentModel.Localizable(true)
System.Drawing.Image
To be added.
When the property is set, the property will be set to null, and the property will be set to its default, -1.
If the property is set to FlatStyle.System, any images assigned to the property are not displayed.
Gets or sets the image that is displayed on a button control.
1.0.5000.0
2.0.0.0
Property
System.ComponentModel.DefaultValue(System.Drawing.ContentAlignment.MiddleCenter)
System.ComponentModel.Localizable(true)
System.Drawing.ContentAlignment
To be added.
To be added.
Gets or sets the alignment of the image on the button control.
1.0.5000.0
2.0.0.0
Property
System.ComponentModel.RefreshProperties(System.ComponentModel.RefreshProperties.Repaint)
System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.ImageIndexConverter))
System.ComponentModel.Editor("System.Windows.Forms.Design.ImageIndexEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(System.Drawing.Design.UITypeEditor))
System.ComponentModel.DefaultValue(-1)
System.ComponentModel.Localizable(true)
System.Int32
To be added.
When the or properties are set, the property is set to its default value, null.
If the property value is changed to null, the property returns its default value, -1. However, the assigned value is retained internally and used when another object is assigned to the property. If the new assigned to the property has an property value that is less than or equal to the value assigned to the property minus one (to account for the collection being a zero-based index), the property value is adjusted to one less than the property value. For example, consider a button control whose has three images and whose property is set to 2. If a new that has only two images is assigned to the button, the value changes to 1.
Gets or sets the image list index value of the image displayed on the button control.
1.0.5000.0
2.0.0.0
Property
2.0.0.0
System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.ImageKeyConverter))
System.ComponentModel.RefreshProperties(System.ComponentModel.RefreshProperties.Repaint)
System.ComponentModel.Editor("System.Windows.Forms.Design.ImageIndexEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(System.Drawing.Design.UITypeEditor))
System.ComponentModel.DefaultValue("")
System.ComponentModel.Localizable(true)
System.String
To be added.
The property specifies the image from the image list to display on the control.
Gets or sets the key accessor for the image in the .
Property
System.ComponentModel.RefreshProperties(System.ComponentModel.RefreshProperties.Repaint)
System.ComponentModel.DefaultValue(null)
System.Windows.Forms.ImageList
To be added.
When the or property is set, the property is set null, which is its default value.
If the property value is changed to null, the property returns its default value, -1. However, the assigned value is retained internally and used when another is assigned to the property. If the new assigned to the property has an property value that is less than or equal to the value assigned to the property minus one (because the collection is a zero-based index), the property value is adjusted to one less than the property value. For example, consider a button control whose has three images and whose property is set to 2. If a new that has only two images is assigned to the button, the value changes to 1.
Gets or sets the that contains the displayed on a button control.
1.0.5000.0
2.0.0.0
Property
System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)
System.ComponentModel.Browsable(false)
System.Windows.Forms.ImeMode
To be added.
This property is not relevant for this class.
Gets or sets the Input Method Editor (IME) mode supported by this control. This property is not relevant for this class.
1.0.5000.0
2.0.0.0
Event
System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)
System.ComponentModel.Browsable(false)
System.EventHandler
This event is not relevant for this class.
Occurs when the property is changed. This event is not relevant for this class.
1.0.5000.0
2.0.0.0
Property
System.Boolean
To be added.
When the property is set to true, the button is the default button for the . This means that the button is clicked when the ENTER key is pressed if no other button or any other control that captures the ENTER key has focus.
To specify the default button of a form, set the property of the form to the desired button.
Gets or sets a value indicating whether the button control is the default button.
1.0.5000.0
2.0.0.0
Method
System.Void
To be added.
To be added.
To be added.
1.0.5000.0
2.0.0.0
Method
System.Void
Raising an event invokes the event handler through a delegate. For more information, see Raising an Event.
The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
Raises the event.
An that contains the event data.
1.0.5000.0
2.0.0.0
Method
System.Void
Raising an event invokes the event handler through a delegate. For more information, see Raising an Event.
The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
Do not call if the button is disabled (this includes calls to the base class's method when you override in a derived class). When disabling the button in an override of , call the base class's method before disabling the button, or do not call it at all.
Raises the event.
A that contains the event data.
1.0.5000.0
2.0.0.0
Method
System.Void
Raising an event invokes the event handler through a delegate. For more information, see Raising an Event.
The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
Raises the event.
A that contains the event data.
1.0.5000.0
2.0.0.0
Method
System.Void
Raising an event invokes the event handler through a delegate. For more information, see Raising an Event.
The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
Raises the event.
An that contains the event data.
1.0.5000.0
2.0.0.0
Method
System.Void
Raising an event invokes the event handler through a delegate. For more information, see Raising an Event.
The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
Do not call if the button is disabled (this includes calls to the base class's method when you override in a derived class). When disabling the button in an override of , call the base class's method before disabling the button, or do not call it at all.
Raises the event.
A that contains the event data.
1.0.5000.0
2.0.0.0
Method
System.Void
Raising an event invokes the event handler through a delegate. For more information, see Raising an Event.
The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
Do not call if the button is disabled (this includes call to the base class's method when you override in a derived class). When disabling the button in an override of , call the base class's method before disabling the button, or do not call it at all.
Raises the event.
An that contains the event data.
1.0.5000.0
2.0.0.0
Method
System.Void
Raising an event invokes the event handler through a delegate. For more information, see Raising an Event.
The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
Raises the event.
An that contains the event data.
1.0.5000.0
2.0.0.0
Method
System.Void
Raising an event invokes the event handler through a delegate. For more information, see Raising an Event.
The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
Do not call if the button is disabled (this includes calls to the base class's method when you override in a derived class). When disabling the button in an override of , call the base class's method before disabling the button, or do not call it at all.
Raises the event.
A that contains the event data.
1.0.5000.0
2.0.0.0
Method
System.Void
Raising an event invokes the event handler through a delegate. For more information, see Raising an Event.
The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
Raises the event.
A that contains the event data.
1.0.5000.0
2.0.0.0
Method
System.Void
Raising an event invokes the event handler through a delegate. For more information, see Raising an Event.
The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
Raises the event.
A that contains the event data.
1.0.5000.0
2.0.0.0
Method
System.Void
To be added.
To be added.
To be added.
1.0.5000.0
2.0.0.0
Method
System.Void
To be added.
To be added.
To be added.
1.0.5000.0
2.0.0.0
Method
System.Void
To be added.
To be added.
To be added.
1.0.5000.0
2.0.0.0
Method
System.Void
To be added.
Resets the control to the state before it is pressed and redraws it.
1.0.5000.0
2.0.0.0
Property
System.String
To be added.
To be added.
To be added.
1.0.5000.0
2.0.0.0
System.ComponentModel.Editor("System.ComponentModel.Design.MultilineStringEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")
System.ComponentModel.SettingsBindable(true)
Property
System.ComponentModel.DefaultValue(System.Drawing.ContentAlignment.MiddleCenter)
System.ComponentModel.Localizable(true)
System.Drawing.ContentAlignment
To be added.
To be added.
Gets or sets the alignment of the text on the button control.
1.0.5000.0
2.0.0.0
Property
2.0.0.0
System.ComponentModel.DefaultValue(System.Windows.Forms.TextImageRelation.Overlay)
System.ComponentModel.Localizable(true)
System.Windows.Forms.TextImageRelation
To be added.
To be added.
Gets or sets the position of text and image relative to each other.
Property
System.Boolean
To be added.
The UseCompatibleTextRendering property is intended to provide visual compatibility between Windows Forms controls that render text using the class and net_v10_short and net_v11_short applications that perform custom text rendering using the class. In most cases, if your application is not being upgraded from net_v10_short or net_v11_short, it is recommended that you leave UseCompatibleTextRendering set to the default value of false.
The ndptecgdi based class was introduced in the dnprdnlong to improve performance, make text look better, and improve support for international fonts. In earlier versions of the dnprdnshort, the ndptecgdiplus based class was used to perform all text rendering. ndptecgdi calculates character spacing and word wrapping differently from ndptecgdiplus. In a Windows Forms application that uses the class to render text, this could cause the text for controls that use to appear different from the other text in the application. To resolve this incompatibility, you can set the UseCompatibleTextRendering property to true for a specific control. To set UseCompatibleTextRendering to true for all supported controls in the application, call the method with a parameter of true.
Gets or sets a value that determines whether to use the class (ndptecgdiplus) or the class (ndptecgdi) to render text.
2.0.0.0
System.ComponentModel.DefaultValue(false)
Property
2.0.0.0
System.ComponentModel.DefaultValue(true)
System.Boolean
To be added.
To be added.
Gets or sets a value indicating whether the first character that is preceded by an ampersand (&) is used as the mnemonic key of the control.
Property
System.Boolean
To be added.
Visual styles are specifications for the appearance of controls. For example, visual styles can define the color, size, and font of controls, and they enable you to configure the visual interface to coordinate with your application interface. Additionally, they provide a mechanism for all Windows-based applications to have visual styles applied.
Gets or sets a value that determines if the background is drawn using visual styles, if supported.
2.0.0.0
Method
System.Void
To be added.
To be added.
To be added.
1.0.5000.0
2.0.0.0
System.ComponentModel.Designer("System.Windows.Forms.Design.ButtonBaseDesigner, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.ComponentModel.Design.IDesigner")
System.Runtime.InteropServices.ComVisible(true)
System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.AutoDispatch)