1 out of 2 rated this helpful - Rate this topic

ButtonBase.FlatAppearance Property

Gets the appearance of the border and the colors used to indicate check state and mouse state.

Namespace:  System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)
[BrowsableAttribute(true)]
public FlatButtonAppearance FlatAppearance { get; }

Use the FlatAppearance property only with Button controls whose FlatStyle is Flat.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
VB.Net code sample.
Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

Button1.BackColor = Color.Black
Button1.ForeColor = Color.White

Button1.FlatAppearance.BorderColor = System.Drawing.Color.Red

Button1.FlatAppearance.BorderSize = 1

Button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat

End Sub
End Class