ControlPaint.DrawBorder3D Método

Definição

Desenha uma borda de estilo tridimensional em um controle.

Sobrecargas

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

Desenha uma borda de estilo tridimensional com o estilo especificado, na superfície e na lateral do gráfico especificado e nos limites especificados em um controle.

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

Desenha uma borda de estilo tridimensional com o estilo especificado, na superfície do gráfico especificado e nos limites especificados em um controle.

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

Desenha uma borda de estilo tridimensional na superfície de gráfico especificada e nos limites especificados em um controle.

DrawBorder3D(Graphics, Rectangle, Border3DStyle, Border3DSide)

Desenha uma borda de estilo tridimensional com o estilo especificado, na superfície e nas laterais do gráfico especificado e nos limites especificados em um controle.

DrawBorder3D(Graphics, Rectangle, Border3DStyle)

Desenha uma borda de estilo tridimensional com o estilo especificado, na superfície do gráfico especificado e nos limites especificados em um controle.

DrawBorder3D(Graphics, Rectangle)

Desenha uma borda de estilo tridimensional na superfície de gráfico especificada e nos limites especificados em um controle.

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

Desenha uma borda de estilo tridimensional com o estilo especificado, na superfície e na lateral do gráfico especificado e nos limites especificados em um controle.

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)

Parâmetros

graphics
Graphics

O Graphics para desenhar.

x
Int32

A coordenada X da parte superior esquerda do retângulo da borda.

y
Int32

A coordenada Y da parte superior esquerda do retângulo da borda.

width
Int32

A largura do retângulo da borda.

height
Int32

A altura do retângulo da borda.

style
Border3DStyle

Um dos valores Border3DStyle que especifica o formato de dados da borda.

sides
Border3DSide

O Border3DSide do retângulo no qual desenhar a borda.

Exemplos

O exemplo de código a seguir demonstra o uso de um dos DrawBorder3D métodos. Para executar este exemplo, cole o código a seguir em um formulário que importa os System.Windows.Forms namespaces e System.Drawing . Verifique se o evento do Paint formulário está associado ao manipulador de eventos neste exemplo.

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

Confira também

Aplica-se a

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

Desenha uma borda de estilo tridimensional com o estilo especificado, na superfície do gráfico especificado e nos limites especificados em um controle.

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)

Parâmetros

graphics
Graphics

O Graphics para desenhar.

x
Int32

A coordenada X da parte superior esquerda do retângulo da borda.

y
Int32

A coordenada Y da parte superior esquerda do retângulo da borda.

width
Int32

A largura do retângulo da borda.

height
Int32

A altura do retângulo da borda.

style
Border3DStyle

Um dos valores Border3DStyle que especifica o formato de dados da borda.

Exemplos

O exemplo de código a seguir demonstra o uso de um dos DrawBorder3D métodos. Para executar este exemplo, cole o código a seguir em um formulário que importa os System.Windows.Forms namespaces e System.Drawing . Verifique se o evento do Paint formulário está associado ao manipulador de eventos neste exemplo.

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

Confira também

Aplica-se a

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

Desenha uma borda de estilo tridimensional na superfície de gráfico especificada e nos limites especificados em um controle.

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)

Parâmetros

graphics
Graphics

O Graphics para desenhar.

x
Int32

A coordenada X da parte superior esquerda do retângulo da borda.

y
Int32

A coordenada Y da parte superior esquerda do retângulo da borda.

width
Int32

A largura do retângulo da borda.

height
Int32

A altura do retângulo da borda.

Exemplos

O exemplo de código a seguir demonstra o uso de um dos DrawBorder3D métodos. Para executar este exemplo, cole o código a seguir em um formulário que importa os System.Windows.Forms namespaces e System.Drawing . Verifique se o evento do Paint formulário está associado ao manipulador de eventos neste exemplo.

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

Comentários

O Border3DStyle.Etched estilo é usado por padrão para desenhar a borda.

Aplica-se a

DrawBorder3D(Graphics, Rectangle, Border3DStyle, Border3DSide)

Desenha uma borda de estilo tridimensional com o estilo especificado, na superfície e nas laterais do gráfico especificado e nos limites especificados em um controle.

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)

Parâmetros

graphics
Graphics

O Graphics para desenhar.

rectangle
Rectangle

O Rectangle que representa as dimensões da borda.

style
Border3DStyle

Um dos valores Border3DStyle que especifica o formato de dados da borda.

sides
Border3DSide

Um dos valores Border3DSide que especifica o lado do retângulo em que a borda deve ser desenhada.

Exemplos

O exemplo de código a seguir demonstra o uso de um dos DrawBorder3D métodos. Para executar este exemplo, cole o código a seguir em um formulário que importa os System.Windows.Forms namespaces e System.Drawing . Verifique se o evento do Paint formulário está associado ao manipulador de eventos neste exemplo.

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

Confira também

Aplica-se a

DrawBorder3D(Graphics, Rectangle, Border3DStyle)

Desenha uma borda de estilo tridimensional com o estilo especificado, na superfície do gráfico especificado e nos limites especificados em um controle.

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)

Parâmetros

graphics
Graphics

O Graphics para desenhar.

rectangle
Rectangle

O Rectangle que representa as dimensões da borda.

style
Border3DStyle

Um dos valores Border3DStyle que especifica o formato de dados da borda.

Exemplos

O exemplo de código a seguir demonstra o uso de um dos DrawBorder3D métodos. Para executar este exemplo, cole o código a seguir em um formulário que importa os System.Windows.Forms namespaces e System.Drawing . Verifique se o evento do Paint formulário está associado ao manipulador de eventos neste exemplo.

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

Confira também

Aplica-se a

DrawBorder3D(Graphics, Rectangle)

Desenha uma borda de estilo tridimensional na superfície de gráfico especificada e nos limites especificados em um controle.

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)

Parâmetros

graphics
Graphics

O Graphics para desenhar.

rectangle
Rectangle

O Rectangle que representa as dimensões da borda.

Exemplos

O exemplo de código a seguir demonstra o uso de um dos DrawBorder3D métodos. Para executar este exemplo, cole o código a seguir em um formulário que importa os System.Windows.Forms namespaces e System.Drawing . Verifique se o evento do Paint formulário está associado ao manipulador de eventos neste exemplo.

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

Comentários

O Border3DStyle.Etched estilo é usado por padrão para desenhar a borda.

Confira também

Aplica-se a