ControlPaint.DrawBorder3D Metoda

Definicja

Rysuje obramowanie stylu trójwymiarowego na kontrolce.

Przeciążenia

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

Rysuje obramowanie stylu trójwymiarowego z określonym stylem, na określonej powierzchni grafiki i stronie oraz w określonych granicach kontrolki.

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

Rysuje obramowanie stylu trójwymiarowego z określonym stylem, na określonej powierzchni grafiki i w określonych granicach kontrolki.

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

Rysuje obramowanie stylu trójwymiarowego na określonej powierzchni grafiki i w określonych granicach kontrolki.

DrawBorder3D(Graphics, Rectangle, Border3DStyle, Border3DSide)

Rysuje obramowanie stylu trójwymiarowego o określonym stylu na określonej powierzchni grafiki i bokach oraz w określonych granicach kontrolki.

DrawBorder3D(Graphics, Rectangle, Border3DStyle)

Rysuje obramowanie stylu trójwymiarowego z określonym stylem, na określonej powierzchni grafiki i w określonych granicach kontrolki.

DrawBorder3D(Graphics, Rectangle)

Rysuje obramowanie stylu trójwymiarowego na określonej powierzchni grafiki i w określonych granicach kontrolki.

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

Rysuje obramowanie stylu trójwymiarowego z określonym stylem, na określonej powierzchni grafiki i stronie oraz w określonych granicach kontrolki.

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)

Parametry

graphics
Graphics

Narysować Graphics .

x
Int32

Współrzędna x lewej górnej krawędzi prostokąta.

y
Int32

Współrzędna y w lewym górnym rogu prostokąta obramowania.

width
Int32

Szerokość prostokąta obramowania.

height
Int32

Wysokość prostokąta obramowania.

style
Border3DStyle

Border3DStyle Jedna z wartości określających styl obramowania.

sides
Border3DSide

Prostokąt Border3DSide do rysowania obramowania.

Przykłady

Poniższy przykład kodu przedstawia użycie jednej z DrawBorder3D metod. Aby uruchomić ten przykład, wklej następujący kod w formularzu, który importuje System.Windows.Forms przestrzenie nazw i System.Drawing . Upewnij się, że zdarzenie formularza Paint jest skojarzone z procedurą obsługi zdarzeń w tym przykładzie.

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

Zobacz też

Dotyczy

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

Rysuje obramowanie stylu trójwymiarowego z określonym stylem, na określonej powierzchni grafiki i w określonych granicach kontrolki.

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)

Parametry

graphics
Graphics

Narysować Graphics .

x
Int32

Współrzędna x lewej górnej krawędzi prostokąta.

y
Int32

Współrzędna y w lewym górnym rogu prostokąta obramowania.

width
Int32

Szerokość prostokąta obramowania.

height
Int32

Wysokość prostokąta obramowania.

style
Border3DStyle

Border3DStyle Jedna z wartości określających styl obramowania.

Przykłady

Poniższy przykład kodu przedstawia użycie jednej z DrawBorder3D metod. Aby uruchomić ten przykład, wklej następujący kod w formularzu, który importuje System.Windows.Forms przestrzenie nazw i System.Drawing . Upewnij się, że zdarzenie formularza Paint jest skojarzone z procedurą obsługi zdarzeń w tym przykładzie.

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

Zobacz też

Dotyczy

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

Rysuje obramowanie stylu trójwymiarowego na określonej powierzchni grafiki i w określonych granicach kontrolki.

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)

Parametry

graphics
Graphics

Narysować Graphics .

x
Int32

Współrzędna x lewej górnej krawędzi prostokąta.

y
Int32

Współrzędna y w lewym górnym rogu prostokąta obramowania.

width
Int32

Szerokość prostokąta obramowania.

height
Int32

Wysokość prostokąta obramowania.

Przykłady

Poniższy przykład kodu przedstawia użycie jednej z DrawBorder3D metod. Aby uruchomić ten przykład, wklej następujący kod w formularzu, który importuje System.Windows.Forms przestrzenie nazw i System.Drawing . Upewnij się, że zdarzenie formularza Paint jest skojarzone z procedurą obsługi zdarzeń w tym przykładzie.

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

Uwagi

Styl Border3DStyle.Etched jest domyślnie używany do rysowania obramowania.

Dotyczy

DrawBorder3D(Graphics, Rectangle, Border3DStyle, Border3DSide)

Rysuje obramowanie stylu trójwymiarowego o określonym stylu na określonej powierzchni grafiki i bokach oraz w określonych granicach kontrolki.

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)

Parametry

graphics
Graphics

Narysować Graphics .

rectangle
Rectangle

Element Rectangle reprezentujący wymiary obramowania.

style
Border3DStyle

Border3DStyle Jedna z wartości określających styl obramowania.

sides
Border3DSide

Border3DSide Jedna z wartości, która określa bok prostokąta, aby narysować obramowanie.

Przykłady

Poniższy przykład kodu przedstawia użycie jednej z DrawBorder3D metod. Aby uruchomić ten przykład, wklej następujący kod w formularzu, który importuje System.Windows.Forms przestrzenie nazw i System.Drawing . Upewnij się, że zdarzenie formularza Paint jest skojarzone z procedurą obsługi zdarzeń w tym przykładzie.

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

Zobacz też

Dotyczy

DrawBorder3D(Graphics, Rectangle, Border3DStyle)

Rysuje obramowanie stylu trójwymiarowego z określonym stylem, na określonej powierzchni grafiki i w określonych granicach kontrolki.

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)

Parametry

graphics
Graphics

Narysować Graphics .

rectangle
Rectangle

Element Rectangle reprezentujący wymiary obramowania.

style
Border3DStyle

Border3DStyle Jedna z wartości określających styl obramowania.

Przykłady

Poniższy przykład kodu przedstawia użycie jednej z DrawBorder3D metod. Aby uruchomić ten przykład, wklej następujący kod w formularzu, który importuje System.Windows.Forms przestrzenie nazw i System.Drawing . Upewnij się, że zdarzenie formularza Paint jest skojarzone z procedurą obsługi zdarzeń w tym przykładzie.

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

Zobacz też

Dotyczy

DrawBorder3D(Graphics, Rectangle)

Rysuje obramowanie stylu trójwymiarowego na określonej powierzchni grafiki i w określonych granicach kontrolki.

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)

Parametry

graphics
Graphics

Narysować Graphics .

rectangle
Rectangle

Element Rectangle reprezentujący wymiary obramowania.

Przykłady

Poniższy przykład kodu przedstawia użycie jednej z DrawBorder3D metod. Aby uruchomić ten przykład, wklej następujący kod w formularzu, który importuje System.Windows.Forms przestrzenie nazw i System.Drawing . Upewnij się, że zdarzenie formularza Paint jest skojarzone z procedurą obsługi zdarzeń w tym przykładzie.

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

Uwagi

Styl Border3DStyle.Etched jest domyślnie używany do rysowania obramowania.

Zobacz też

Dotyczy