ControlPaint.DrawBorder3D Método

Definición

Dibuja un borde de estilo tridimensional en un control.Draws a three-dimensional style border on a control.

Sobrecargas

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

Dibuja un borde de estilo tridimensional con el estilo especificado, en la superficie gráfica y lado especificados y dentro de los límites especificados en un control.Draws a three-dimensional style border with the specified style, on the specified graphics surface and side, and within the specified bounds on a control.

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

Dibuja un borde de estilo tridimensional con el estilo especificado, en la superficie gráfica especificada y dentro de los límites especificados de un control.Draws a three-dimensional style border with the specified style, on the specified graphics surface, and within the specified bounds on a control.

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

Dibuja un borde de estilo tridimensional en la superficie gráfica especificada y dentro de los límites especificados de un control.Draws a three-dimensional style border on the specified graphics surface and within the specified bounds on a control.

DrawBorder3D(Graphics, Rectangle, Border3DStyle, Border3DSide)

Dibuja un borde de estilo tridimensional con el estilo especificado, en la superficie gráfica y lados especificados y dentro de los límites especificados en un control.Draws a three-dimensional style border with the specified style, on the specified graphics surface and sides, and within the specified bounds on a control.

DrawBorder3D(Graphics, Rectangle, Border3DStyle)

Dibuja un borde de estilo tridimensional con el estilo especificado, en la superficie gráfica especificada y dentro de los límites especificados de un control.Draws a three-dimensional style border with the specified style, on the specified graphics surface, and within the specified bounds on a control.

DrawBorder3D(Graphics, Rectangle)

Dibuja un borde de estilo tridimensional en la superficie gráfica especificada y dentro de los límites especificados de un control.Draws a three-dimensional style border on the specified graphics surface and within the specified bounds on a control.

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

Dibuja un borde de estilo tridimensional con el estilo especificado, en la superficie gráfica y lado especificados y dentro de los límites especificados en un control.Draws a three-dimensional style border with the specified style, on the specified graphics surface and side, and within the specified bounds on a control.

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

Parámetros

graphics
Graphics

Graphics donde se va a dibujar.The Graphics to draw on.

x
Int32

Coordenada x del ángulo superior izquierdo del rectángulo del borde.The x-coordinate of the top left of the border rectangle.

y
Int32

Coordenada y del ángulo superior izquierdo del rectángulo del borde.The y-coordinate of the top left of the border rectangle.

width
Int32

Ancho del rectángulo del borde.The width of the border rectangle.

height
Int32

Alto del rectángulo del borde.The height of the border rectangle.

style
Border3DStyle

Uno de los valores de Border3DStyle que especifica el estilo del borde.One of the Border3DStyle values that specifies the style of the border.

sides
Border3DSide

Border3DSide del rectángulo donde se va a dibujar el borde.The Border3DSide of the rectangle to draw the border on.

Ejemplos

En el ejemplo de código siguiente se muestra el uso de DrawBorder3D uno de los métodos.The following code example demonstrates the use of one of the DrawBorder3D methods. Para ejecutar este ejemplo, pegue el código siguiente en un formulario que importe los System.Windows.Forms espacios System.Drawing de nombres y.To run this example, paste the following code in a form that imports the System.Windows.Forms and System.Drawing namespaces. Asegúrese de que el Paint evento del formulario está asociado con el controlador de eventos en este ejemplo.Ensure the form's Paint event is associated with the event handler in this example.

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

Consulte también:

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

Dibuja un borde de estilo tridimensional con el estilo especificado, en la superficie gráfica especificada y dentro de los límites especificados de un control.Draws a three-dimensional style border with the specified style, on the specified graphics surface, and within the specified bounds on a control.

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

Parámetros

graphics
Graphics

Graphics donde se va a dibujar.The Graphics to draw on.

x
Int32

Coordenada x del ángulo superior izquierdo del rectángulo del borde.The x-coordinate of the top left of the border rectangle.

y
Int32

Coordenada y del ángulo superior izquierdo del rectángulo del borde.The y-coordinate of the top left of the border rectangle.

width
Int32

Ancho del rectángulo del borde.The width of the border rectangle.

height
Int32

Alto del rectángulo del borde.The height of the border rectangle.

style
Border3DStyle

Uno de los valores de Border3DStyle que especifica el estilo del borde.One of the Border3DStyle values that specifies the style of the border.

Ejemplos

En el ejemplo de código siguiente se muestra el uso de DrawBorder3D uno de los métodos.The following code example demonstrates the use of one of the DrawBorder3D methods. Para ejecutar este ejemplo, pegue el código siguiente en un formulario que importe los System.Windows.Forms espacios System.Drawing de nombres y.To run this example, paste the following code in a form that imports the System.Windows.Forms and System.Drawing namespaces. Asegúrese de que el Paint evento del formulario está asociado con el controlador de eventos en este ejemplo.Ensure the form's Paint event is associated with the event handler in this example.

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

Consulte también:

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

Dibuja un borde de estilo tridimensional en la superficie gráfica especificada y dentro de los límites especificados de un control.Draws a three-dimensional style border on the specified graphics surface and within the specified bounds on a control.

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

Parámetros

graphics
Graphics

Graphics donde se va a dibujar.The Graphics to draw on.

x
Int32

Coordenada x del ángulo superior izquierdo del rectángulo del borde.The x-coordinate of the top left of the border rectangle.

y
Int32

Coordenada y del ángulo superior izquierdo del rectángulo del borde.The y-coordinate of the top left of the border rectangle.

width
Int32

Ancho del rectángulo del borde.The width of the border rectangle.

height
Int32

Alto del rectángulo del borde.The height of the border rectangle.

Ejemplos

En el ejemplo de código siguiente se muestra el uso de DrawBorder3D uno de los métodos.The following code example demonstrates the use of one of the DrawBorder3D methods. Para ejecutar este ejemplo, pegue el código siguiente en un formulario que importe los System.Windows.Forms espacios System.Drawing de nombres y.To run this example, paste the following code in a form that imports the System.Windows.Forms and System.Drawing namespaces. Asegúrese de que el Paint evento del formulario está asociado con el controlador de eventos en este ejemplo.Ensure the form's Paint event is associated with the event handler in this example.

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

Comentarios

De Border3DStyle.Etched forma predeterminada, se usa el estilo para dibujar el borde.The Border3DStyle.Etched style is used by default to draw the border.

DrawBorder3D(Graphics, Rectangle, Border3DStyle, Border3DSide)

Dibuja un borde de estilo tridimensional con el estilo especificado, en la superficie gráfica y lados especificados y dentro de los límites especificados en un control.Draws a three-dimensional style border with the specified style, on the specified graphics surface and sides, and within the specified bounds on a control.

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

Parámetros

graphics
Graphics

Graphics donde se va a dibujar.The Graphics to draw on.

rectangle
Rectangle

Rectangle que representa las dimensiones del borde.The Rectangle that represents the dimensions of the border.

style
Border3DStyle

Uno de los valores de Border3DStyle que especifica el estilo del borde.One of the Border3DStyle values that specifies the style of the border.

sides
Border3DSide

Uno de los valores de Border3DSide que especifica el lado del rectángulo en el que se va a dibujar el borde.One of the Border3DSide values that specifies the side of the rectangle to draw the border on.

Ejemplos

En el ejemplo de código siguiente se muestra el uso de DrawBorder3D uno de los métodos.The following code example demonstrates the use of one of the DrawBorder3D methods. Para ejecutar este ejemplo, pegue el código siguiente en un formulario que importe los System.Windows.Forms espacios System.Drawing de nombres y.To run this example, paste the following code in a form that imports the System.Windows.Forms and System.Drawing namespaces. Asegúrese de que el Paint evento del formulario está asociado con el controlador de eventos en este ejemplo.Ensure the form's Paint event is associated with the event handler in this example.

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

Consulte también:

DrawBorder3D(Graphics, Rectangle, Border3DStyle)

Dibuja un borde de estilo tridimensional con el estilo especificado, en la superficie gráfica especificada y dentro de los límites especificados de un control.Draws a three-dimensional style border with the specified style, on the specified graphics surface, and within the specified bounds on a control.

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

Parámetros

graphics
Graphics

Graphics donde se va a dibujar.The Graphics to draw on.

rectangle
Rectangle

Rectangle que representa las dimensiones del borde.The Rectangle that represents the dimensions of the border.

style
Border3DStyle

Uno de los valores de Border3DStyle que especifica el estilo del borde.One of the Border3DStyle values that specifies the style of the border.

Ejemplos

En el ejemplo de código siguiente se muestra el uso de DrawBorder3D uno de los métodos.The following code example demonstrates the use of one of the DrawBorder3D methods. Para ejecutar este ejemplo, pegue el código siguiente en un formulario que importe los System.Windows.Forms espacios System.Drawing de nombres y.To run this example, paste the following code in a form that imports the System.Windows.Forms and System.Drawing namespaces. Asegúrese de que el Paint evento del formulario está asociado con el controlador de eventos en este ejemplo.Ensure the form's Paint event is associated with the event handler in this example.

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

Consulte también:

DrawBorder3D(Graphics, Rectangle)

Dibuja un borde de estilo tridimensional en la superficie gráfica especificada y dentro de los límites especificados de un control.Draws a three-dimensional style border on the specified graphics surface and within the specified bounds on a control.

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

Parámetros

graphics
Graphics

Graphics donde se va a dibujar.The Graphics to draw on.

rectangle
Rectangle

Rectangle que representa las dimensiones del borde.The Rectangle that represents the dimensions of the border.

Ejemplos

En el ejemplo de código siguiente se muestra el uso de DrawBorder3D uno de los métodos.The following code example demonstrates the use of one of the DrawBorder3D methods. Para ejecutar este ejemplo, pegue el código siguiente en un formulario que importe los System.Windows.Forms espacios System.Drawing de nombres y.To run this example, paste the following code in a form that imports the System.Windows.Forms and System.Drawing namespaces. Asegúrese de que el Paint evento del formulario está asociado con el controlador de eventos en este ejemplo.Ensure the form's Paint event is associated with the event handler in this example.

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

Comentarios

De Border3DStyle.Etched forma predeterminada, se usa el estilo para dibujar el borde.The Border3DStyle.Etched style is used by default to draw the border.

Consulte también:

Se aplica a