ButtonBase.FlatAppearance Property
.NET Framework 4
Gets the appearance of the border and the colors used to indicate check state and mouse state.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Property Value
Type: System.Windows.Forms.FlatButtonAppearanceOne of the FlatButtonAppearance values.
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.
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
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
- 1/31/2011
- John Anthony Oliver
- 1/31/2011
- John Anthony Oliver