ControlPaint.DrawBorder3D Метод

Определение

Рисует трехмерную границу на элементе управления.

Перегрузки

DrawBorder3D(Graphics, Int32, Int32, Int32, Int32, Border3DStyle, Border3DSide)

Рисует трехмерную границу в указанном стиле, на указанной графической поверхности и заданной стороне, а также в пределах указанных границ на элементе управления.

DrawBorder3D(Graphics, Int32, Int32, Int32, Int32, Border3DStyle)

Рисует трехмерную границу в указанном стиле, на указанной графической поверхности, в пределах указанных границ на элементе управления.

DrawBorder3D(Graphics, Int32, Int32, Int32, Int32)

Рисует трехмерную границу на указанной графической поверхности, в пределах указанных границ на элементе управления.

DrawBorder3D(Graphics, Rectangle, Border3DStyle, Border3DSide)

Рисует трехмерную границу в указанном стиле, на указанной графической поверхности и заданных сторонах, а также в пределах указанных границ на элементе управления.

DrawBorder3D(Graphics, Rectangle, Border3DStyle)

Рисует трехмерную границу в указанном стиле, на указанной графической поверхности, в пределах указанных границ на элементе управления.

DrawBorder3D(Graphics, Rectangle)

Рисует трехмерную границу на указанной графической поверхности, в пределах указанных границ на элементе управления.

DrawBorder3D(Graphics, Int32, Int32, Int32, Int32, Border3DStyle, Border3DSide)

Рисует трехмерную границу в указанном стиле, на указанной графической поверхности и заданной стороне, а также в пределах указанных границ на элементе управления.

public:
 static void DrawBorder3D(System::Drawing::Graphics ^ graphics, int x, int y, int width, int height, System::Windows::Forms::Border3DStyle style, System::Windows::Forms::Border3DSide sides);
public static void DrawBorder3D (System.Drawing.Graphics graphics, int x, int y, int width, int height, System.Windows.Forms.Border3DStyle style, System.Windows.Forms.Border3DSide sides);
static member DrawBorder3D : System.Drawing.Graphics * int * int * int * int * System.Windows.Forms.Border3DStyle * System.Windows.Forms.Border3DSide -> unit
Public Shared Sub DrawBorder3D (graphics As Graphics, x As Integer, y As Integer, width As Integer, height As Integer, style As Border3DStyle, sides As Border3DSide)

Параметры

graphics
Graphics

Вызываемый объект Graphics.

x
Int32

Координата по оси X границы верхнего левого угла прямоугольника.

y
Int32

Координата по оси Y границы верхнего левого угла прямоугольника.

width
Int32

Ширина прямоугольника границ.

height
Int32

Высота прямоугольника границ.

style
Border3DStyle

Одно из значений Border3DStyle, определяющее стиль границы.

sides
Border3DSide

Border3DSide прямоугольника, на которой необходимо нарисовать границу.

Примеры

В следующем примере кода показано использование одного из DrawBorder3D методов . Чтобы выполнить этот пример, вставьте следующий код в форму, которая импортирует System.Windows.Forms пространства имен и System.Drawing . Убедитесь, что событие формы Paint связано с обработчиком событий в этом примере.

// 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

См. также раздел

Применяется к

DrawBorder3D(Graphics, Int32, Int32, Int32, Int32, Border3DStyle)

Рисует трехмерную границу в указанном стиле, на указанной графической поверхности, в пределах указанных границ на элементе управления.

public:
 static void DrawBorder3D(System::Drawing::Graphics ^ graphics, int x, int y, int width, int height, System::Windows::Forms::Border3DStyle style);
public static void DrawBorder3D (System.Drawing.Graphics graphics, int x, int y, int width, int height, System.Windows.Forms.Border3DStyle style);
static member DrawBorder3D : System.Drawing.Graphics * int * int * int * int * System.Windows.Forms.Border3DStyle -> unit
Public Shared Sub DrawBorder3D (graphics As Graphics, x As Integer, y As Integer, width As Integer, height As Integer, style As Border3DStyle)

Параметры

graphics
Graphics

Вызываемый объект Graphics.

x
Int32

Координата по оси X границы верхнего левого угла прямоугольника.

y
Int32

Координата по оси Y границы верхнего левого угла прямоугольника.

width
Int32

Ширина прямоугольника границ.

height
Int32

Высота прямоугольника границ.

style
Border3DStyle

Одно из значений Border3DStyle, определяющее стиль границы.

Примеры

В следующем примере кода показано использование одного из DrawBorder3D методов . Чтобы выполнить этот пример, вставьте следующий код в форму, которая импортирует System.Windows.Forms пространства имен и System.Drawing . Убедитесь, что событие формы Paint связано с обработчиком событий в этом примере.

// 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

См. также раздел

Применяется к

DrawBorder3D(Graphics, Int32, Int32, Int32, Int32)

Рисует трехмерную границу на указанной графической поверхности, в пределах указанных границ на элементе управления.

public:
 static void DrawBorder3D(System::Drawing::Graphics ^ graphics, int x, int y, int width, int height);
public static void DrawBorder3D (System.Drawing.Graphics graphics, int x, int y, int width, int height);
static member DrawBorder3D : System.Drawing.Graphics * int * int * int * int -> unit
Public Shared Sub DrawBorder3D (graphics As Graphics, x As Integer, y As Integer, width As Integer, height As Integer)

Параметры

graphics
Graphics

Вызываемый объект Graphics.

x
Int32

Координата по оси X границы верхнего левого угла прямоугольника.

y
Int32

Координата по оси Y границы верхнего левого угла прямоугольника.

width
Int32

Ширина прямоугольника границ.

height
Int32

Высота прямоугольника границ.

Примеры

В следующем примере кода показано использование одного из DrawBorder3D методов . Чтобы выполнить этот пример, вставьте следующий код в форму, которая импортирует System.Windows.Forms пространства имен и System.Drawing . Убедитесь, что событие формы Paint связано с обработчиком событий в этом примере.

// 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

Комментарии

Стиль Border3DStyle.Etched используется по умолчанию для рисования границы.

Применяется к

DrawBorder3D(Graphics, Rectangle, Border3DStyle, Border3DSide)

Рисует трехмерную границу в указанном стиле, на указанной графической поверхности и заданных сторонах, а также в пределах указанных границ на элементе управления.

public:
 static void DrawBorder3D(System::Drawing::Graphics ^ graphics, System::Drawing::Rectangle rectangle, System::Windows::Forms::Border3DStyle style, System::Windows::Forms::Border3DSide sides);
public static void DrawBorder3D (System.Drawing.Graphics graphics, System.Drawing.Rectangle rectangle, System.Windows.Forms.Border3DStyle style, System.Windows.Forms.Border3DSide sides);
static member DrawBorder3D : System.Drawing.Graphics * System.Drawing.Rectangle * System.Windows.Forms.Border3DStyle * System.Windows.Forms.Border3DSide -> unit
Public Shared Sub DrawBorder3D (graphics As Graphics, rectangle As Rectangle, style As Border3DStyle, sides As Border3DSide)

Параметры

graphics
Graphics

Вызываемый объект Graphics.

rectangle
Rectangle

Rectangle, который представляет размеры границы.

style
Border3DStyle

Одно из значений Border3DStyle, определяющее стиль границы.

sides
Border3DSide

Одно из значений Border3DSide, определяющее сторону прямоугольника, на котором необходимо нарисовать границу.

Примеры

В следующем примере кода показано использование одного из DrawBorder3D методов . Чтобы выполнить этот пример, вставьте следующий код в форму, которая импортирует System.Windows.Forms пространства имен и System.Drawing . Убедитесь, что событие формы Paint связано с обработчиком событий в этом примере.

// 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

См. также раздел

Применяется к

DrawBorder3D(Graphics, Rectangle, Border3DStyle)

Рисует трехмерную границу в указанном стиле, на указанной графической поверхности, в пределах указанных границ на элементе управления.

public:
 static void DrawBorder3D(System::Drawing::Graphics ^ graphics, System::Drawing::Rectangle rectangle, System::Windows::Forms::Border3DStyle style);
public static void DrawBorder3D (System.Drawing.Graphics graphics, System.Drawing.Rectangle rectangle, System.Windows.Forms.Border3DStyle style);
static member DrawBorder3D : System.Drawing.Graphics * System.Drawing.Rectangle * System.Windows.Forms.Border3DStyle -> unit
Public Shared Sub DrawBorder3D (graphics As Graphics, rectangle As Rectangle, style As Border3DStyle)

Параметры

graphics
Graphics

Вызываемый объект Graphics.

rectangle
Rectangle

Rectangle, который представляет размеры границы.

style
Border3DStyle

Одно из значений Border3DStyle, определяющее стиль границы.

Примеры

В следующем примере кода показано использование одного из DrawBorder3D методов . Чтобы выполнить этот пример, вставьте следующий код в форму, которая импортирует System.Windows.Forms пространства имен и System.Drawing . Убедитесь, что событие формы Paint связано с обработчиком событий в этом примере.

// 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

См. также раздел

Применяется к

DrawBorder3D(Graphics, Rectangle)

Рисует трехмерную границу на указанной графической поверхности, в пределах указанных границ на элементе управления.

public:
 static void DrawBorder3D(System::Drawing::Graphics ^ graphics, System::Drawing::Rectangle rectangle);
public static void DrawBorder3D (System.Drawing.Graphics graphics, System.Drawing.Rectangle rectangle);
static member DrawBorder3D : System.Drawing.Graphics * System.Drawing.Rectangle -> unit
Public Shared Sub DrawBorder3D (graphics As Graphics, rectangle As Rectangle)

Параметры

graphics
Graphics

Вызываемый объект Graphics.

rectangle
Rectangle

Rectangle, который представляет размеры границы.

Примеры

В следующем примере кода показано использование одного из DrawBorder3D методов . Чтобы выполнить этот пример, вставьте следующий код в форму, которая импортирует System.Windows.Forms пространства имен и System.Drawing . Убедитесь, что событие формы Paint связано с обработчиком событий в этом примере.

// 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

Комментарии

Стиль Border3DStyle.Etched используется по умолчанию для рисования границы.

См. также раздел

Применяется к