System.Windows.Forms.ButtonBase Class

Implements the basic functionality common to button controls.

See Also: ButtonBase Members

Syntax

[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)]
public abstract class ButtonBase : Control

Remarks

You do not typically inherit from System.Windows.Forms.ButtonBase. To create your own button class, inherit from the System.Windows.Forms.Button, System.Windows.Forms.CheckBox, or System.Windows.Forms.RadioButton class.

To have the derived button control display an image, set the ButtonBase.Image property or the ButtonBase.ImageList and ButtonBase.ImageIndex properties. The image can be aligned on the button control by setting the ButtonBase.ImageAlign property. Likewise, to align the Control.Text displayed on the button control, set the ButtonBase.TextAlign property.

The ButtonBase.FlatStyle property determines the style and appearance of the control. If the ButtonBase.FlatStyle property is set to FlatStyle.System, the user's operating system determines the appearance of the control.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0