Share via


ControlPaint.DrawBorder Yöntem

Tanım

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

Aşırı Yüklemeler

DrawBorder(Graphics, Rectangle, Color, ButtonBorderStyle)

Belirtilen grafik yüzeyinde ve düğme stili denetiminde belirtilen sınırların içinde belirtilen stil ve renge sahip 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 stili bir denetime kenarlık çizer; belirtilen grafik yüzeyinde; ve belirtilen sınırların içinde.

DrawBorder(Graphics, Rectangle, Color, ButtonBorderStyle)

Belirtilen grafik yüzeyinde ve düğme stili denetiminde belirtilen sınırların içinde belirtilen stil ve renge sahip 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

Üzerine Graphics çizecek.

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 ve System.Drawing ad alanlarını içeri aktaran System.Windows.Forms 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)

Belirtilen stiller, renkler ve kenarlık genişlikleriyle düğme stili bir denetime kenarlık çizer; belirtilen grafik yüzeyinde; ve belirtilen sınırların 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

Üzerine Graphics çizecek.

bounds
Rectangle

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

leftColor
Color

Sınırın Color solunda.

leftWidth
Int32

Sol kenarlık genişliği.

leftStyle
ButtonBorderStyle

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

topColor
Color

Kenarlık Color üst kısmında.

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

Kenarlık 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 ve System.Drawing ad alanlarını içeri aktaran System.Windows.Forms 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