ControlPaint.DrawBorder Yöntem

Tanım

Düğme stili bir denetime kenarlık çizer.

Aşırı Yüklemeler

Name Description
DrawBorder(Graphics, Rectangle, Color, ButtonBorderStyle)

Belirtilen grafik yüzeyinde ve düğme stili denetiminde belirtilen sınırlar içinde belirtilen stil ve renkle bir kenarlık çizer.

DrawBorder(Graphics, Rectangle, Color, Int32, ButtonBorderStyle, Color, Int32, ButtonBorderStyle, Color, Int32, ButtonBorderStyle, Color, Int32, ButtonBorderStyle)

Belirtilen stiller, renkler ve kenarlık genişlikleriyle düğme stilinde bir denetime kenarlık çizer; belirtilen grafik yüzeyinde; ve belirtilen sınırlar içinde.

DrawBorder(Graphics, Rectangle, Color, ButtonBorderStyle)

Kaynak:
ControlPaint.cs
Kaynak:
ControlPaint.cs
Kaynak:
ControlPaint.cs
Kaynak:
ControlPaint.cs
Kaynak:
ControlPaint.cs

Belirtilen grafik yüzeyinde ve düğme stili denetiminde belirtilen sınırlar içinde belirtilen stil ve renkle bir kenarlık çizer.

public:
 static void DrawBorder(System::Drawing::Graphics ^ graphics, System::Drawing::Rectangle bounds, System::Drawing::Color color, System::Windows::Forms::ButtonBorderStyle style);
public static void DrawBorder(System.Drawing.Graphics graphics, System.Drawing.Rectangle bounds, System.Drawing.Color color, System.Windows.Forms.ButtonBorderStyle style);
static member DrawBorder : System.Drawing.Graphics * System.Drawing.Rectangle * System.Drawing.Color * System.Windows.Forms.ButtonBorderStyle -> unit
Public Shared Sub DrawBorder (graphics As Graphics, bounds As Rectangle, color As Color, style As ButtonBorderStyle)

Parametreler

graphics
Graphics

Çizecek Graphics olan.

bounds
Rectangle

Sınırın Rectangle boyutlarını temsil eden.

color
Color

Sınırın Color .

style
ButtonBorderStyle

Kenarlık ButtonBorderStyle stilini belirten değerlerden biri.

Örnekler

Aşağıdaki kod örneği yöntemlerden birinin DrawBorder3D kullanımını gösterir. Bu örneği çalıştırmak için aşağıdaki kodu System.Windows.Forms ve System.Drawing ad alanlarını içeri aktaran bir forma yapıştırın. Formun Paint olayının bu örnekteki olay işleyicisiyle ilişkilendirildiğinden emin olun.

// Handle the Form's Paint event to draw a 3D three-dimensional 
// raised border just inside the border of the frame.
void Form1_Paint( Object^ /*sender*/, PaintEventArgs^ e )
{
   Rectangle borderRectangle = this->ClientRectangle;
   borderRectangle.Inflate(  -10, -10 );
   ControlPaint::DrawBorder3D( e->Graphics, borderRectangle, Border3DStyle::Raised );
}
// Handle the Form's Paint event to draw a 3D three-dimensional 
// raised border just inside the border of the frame.
private void Form1_Paint(object sender, PaintEventArgs e)
{

    Rectangle borderRectangle = this.ClientRectangle;
    borderRectangle.Inflate(-10, -10);
    ControlPaint.DrawBorder3D(e.Graphics, borderRectangle, 
        Border3DStyle.Raised);
}
' Handle the Form's Paint event to draw a 3D three-dimensional 
' raised border just inside the border of the frame.
Private Sub Form1_Paint(ByVal sender As Object, _
    ByVal e As PaintEventArgs) Handles MyBase.Paint

    Dim borderRectangle As Rectangle = Me.ClientRectangle
    borderRectangle.Inflate(-10, -10)
    ControlPaint.DrawBorder3D(e.Graphics, borderRectangle, _
        Border3DStyle.Raised)
End Sub

Şunlara uygulanır

DrawBorder(Graphics, Rectangle, Color, Int32, ButtonBorderStyle, Color, Int32, ButtonBorderStyle, Color, Int32, ButtonBorderStyle, Color, Int32, ButtonBorderStyle)

Kaynak:
ControlPaint.cs
Kaynak:
ControlPaint.cs
Kaynak:
ControlPaint.cs
Kaynak:
ControlPaint.cs
Kaynak:
ControlPaint.cs

Belirtilen stiller, renkler ve kenarlık genişlikleriyle düğme stilinde bir denetime kenarlık çizer; belirtilen grafik yüzeyinde; ve belirtilen sınırlar içinde.

public:
 static void DrawBorder(System::Drawing::Graphics ^ graphics, System::Drawing::Rectangle bounds, System::Drawing::Color leftColor, int leftWidth, System::Windows::Forms::ButtonBorderStyle leftStyle, System::Drawing::Color topColor, int topWidth, System::Windows::Forms::ButtonBorderStyle topStyle, System::Drawing::Color rightColor, int rightWidth, System::Windows::Forms::ButtonBorderStyle rightStyle, System::Drawing::Color bottomColor, int bottomWidth, System::Windows::Forms::ButtonBorderStyle bottomStyle);
public static void DrawBorder(System.Drawing.Graphics graphics, System.Drawing.Rectangle bounds, System.Drawing.Color leftColor, int leftWidth, System.Windows.Forms.ButtonBorderStyle leftStyle, System.Drawing.Color topColor, int topWidth, System.Windows.Forms.ButtonBorderStyle topStyle, System.Drawing.Color rightColor, int rightWidth, System.Windows.Forms.ButtonBorderStyle rightStyle, System.Drawing.Color bottomColor, int bottomWidth, System.Windows.Forms.ButtonBorderStyle bottomStyle);
static member DrawBorder : System.Drawing.Graphics * System.Drawing.Rectangle * System.Drawing.Color * int * System.Windows.Forms.ButtonBorderStyle * System.Drawing.Color * int * System.Windows.Forms.ButtonBorderStyle * System.Drawing.Color * int * System.Windows.Forms.ButtonBorderStyle * System.Drawing.Color * int * System.Windows.Forms.ButtonBorderStyle -> unit
Public Shared Sub DrawBorder (graphics As Graphics, bounds As Rectangle, leftColor As Color, leftWidth As Integer, leftStyle As ButtonBorderStyle, topColor As Color, topWidth As Integer, topStyle As ButtonBorderStyle, rightColor As Color, rightWidth As Integer, rightStyle As ButtonBorderStyle, bottomColor As Color, bottomWidth As Integer, bottomStyle As ButtonBorderStyle)

Parametreler

graphics
Graphics

Çizecek Graphics olan.

bounds
Rectangle

Sınırın Rectangle boyutlarını temsil eden.

leftColor
Color

Sınırın Color solu.

leftWidth
Int32

Sol kenarlık genişliği.

leftStyle
ButtonBorderStyle

Sol kenarlık ButtonBorderStyle stilini belirten değerlerden biri.

topColor
Color

Sınırın Color üst kısmı.

topWidth
Int32

Üst kenarlık genişliği.

topStyle
ButtonBorderStyle

Üst kenarlık ButtonBorderStyle stilini belirten değerlerden biri.

rightColor
Color

Sınırın Color sağındaki.

rightWidth
Int32

Sağ kenarlık genişliği.

rightStyle
ButtonBorderStyle

Sağ kenarlık ButtonBorderStyle stilini belirten değerlerden biri.

bottomColor
Color

Sınırın Color alt kısmı.

bottomWidth
Int32

Alt kenarlık genişliği.

bottomStyle
ButtonBorderStyle

Alt kenarlık ButtonBorderStyle stilini belirten değerlerden biri.

Örnekler

Aşağıdaki kod örneği yöntemlerden birinin DrawBorder3D kullanımını gösterir. Bu örneği çalıştırmak için aşağıdaki kodu System.Windows.Forms ve System.Drawing ad alanlarını içeri aktaran bir forma yapıştırın. Formun Paint olayının bu örnekteki olay işleyicisiyle ilişkilendirildiğinden emin olun.

// Handle the Form's Paint event to draw a 3D three-dimensional 
// raised border just inside the border of the frame.
void Form1_Paint( Object^ /*sender*/, PaintEventArgs^ e )
{
   Rectangle borderRectangle = this->ClientRectangle;
   borderRectangle.Inflate(  -10, -10 );
   ControlPaint::DrawBorder3D( e->Graphics, borderRectangle, Border3DStyle::Raised );
}
// Handle the Form's Paint event to draw a 3D three-dimensional 
// raised border just inside the border of the frame.
private void Form1_Paint(object sender, PaintEventArgs e)
{

    Rectangle borderRectangle = this.ClientRectangle;
    borderRectangle.Inflate(-10, -10);
    ControlPaint.DrawBorder3D(e.Graphics, borderRectangle, 
        Border3DStyle.Raised);
}
' Handle the Form's Paint event to draw a 3D three-dimensional 
' raised border just inside the border of the frame.
Private Sub Form1_Paint(ByVal sender As Object, _
    ByVal e As PaintEventArgs) Handles MyBase.Paint

    Dim borderRectangle As Rectangle = Me.ClientRectangle
    borderRectangle.Inflate(-10, -10)
    ControlPaint.DrawBorder3D(e.Graphics, borderRectangle, _
        Border3DStyle.Raised)
End Sub

Ayrıca bkz.

Şunlara uygulanır