Language

ControlPaint.DrawBorder3D メソッド

定義

コントロールに 3 次元スタイルの罫線を描画します。

オーバーロード

名前 説明
DrawBorder3D(Graphics, Int32, Int32, Int32, Int32, Border3DStyle, Border3DSide)

指定したスタイルを持つ 3 次元スタイルの境界線を、指定したグラフィックスサーフェイスと側面に、およびコントロールの指定された境界内に描画します。

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

指定したスタイルを持つ 3 次元スタイルの境界線を、指定したグラフィックスサーフェイス上、およびコントロール上の指定された境界内に描画します。

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

指定したグラフィックスサーフェイスとコントロールの指定した境界内に、3 次元スタイルの境界線を描画します。

DrawBorder3D(Graphics, Rectangle, Border3DStyle, Border3DSide)

指定したスタイルを持つ 3 次元スタイルの罫線を、指定したグラフィックスサーフェイスと辺、およびコントロール上の指定された境界内に描画します。

DrawBorder3D(Graphics, Rectangle, Border3DStyle)

指定したスタイルを持つ 3 次元スタイルの境界線を、指定したグラフィックスサーフェイス上、およびコントロール上の指定された境界内に描画します。

DrawBorder3D(Graphics, Rectangle)

指定したグラフィックスサーフェイスとコントロールの指定した境界内に、3 次元スタイルの境界線を描画します。

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

ソース:
ControlPaint.cs
ソース:
ControlPaint.cs
ソース:
ControlPaint.cs
ソース:
ControlPaint.cs
ソース:
ControlPaint.cs

指定したスタイルを持つ 3 次元スタイルの境界線を、指定したグラフィックスサーフェイスと側面に、およびコントロールの指定された境界内に描画します。

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 値の 1 つ。

sides
Border3DSide

罫線を描画する四角形の Border3DSide 。

例

次のコード例は、 DrawBorder3D メソッドの 1 つを使用する方法を示しています。 この例を実行するには、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)

ソース:
ControlPaint.cs
ソース:
ControlPaint.cs
ソース:
ControlPaint.cs
ソース:
ControlPaint.cs
ソース:
ControlPaint.cs

指定したスタイルを持つ 3 次元スタイルの境界線を、指定したグラフィックスサーフェイス上、およびコントロール上の指定された境界内に描画します。

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 値の 1 つ。

例

次のコード例は、 DrawBorder3D メソッドの 1 つを使用する方法を示しています。 この例を実行するには、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)

ソース:
ControlPaint.cs
ソース:
ControlPaint.cs
ソース:
ControlPaint.cs
ソース:
ControlPaint.cs
ソース:
ControlPaint.cs

指定したグラフィックスサーフェイスとコントロールの指定した境界内に、3 次元スタイルの境界線を描画します。

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 メソッドの 1 つを使用する方法を示しています。 この例を実行するには、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)

ソース:
ControlPaint.cs
ソース:
ControlPaint.cs
ソース:
ControlPaint.cs
ソース:
ControlPaint.cs
ソース:
ControlPaint.cs

指定したスタイルを持つ 3 次元スタイルの罫線を、指定したグラフィックスサーフェイスと辺、およびコントロール上の指定された境界内に描画します。

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 値の 1 つ。

sides
Border3DSide

罫線を描画する四角形の側面を指定する Border3DSide 値の 1 つ。

例

次のコード例は、 DrawBorder3D メソッドの 1 つを使用する方法を示しています。 この例を実行するには、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)

ソース:
ControlPaint.cs
ソース:
ControlPaint.cs
ソース:
ControlPaint.cs
ソース:
ControlPaint.cs
ソース:
ControlPaint.cs

指定したスタイルを持つ 3 次元スタイルの境界線を、指定したグラフィックスサーフェイス上、およびコントロール上の指定された境界内に描画します。

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 値の 1 つ。

例

次のコード例は、 DrawBorder3D メソッドの 1 つを使用する方法を示しています。 この例を実行するには、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)

ソース:
ControlPaint.cs
ソース:
ControlPaint.cs
ソース:
ControlPaint.cs
ソース:
ControlPaint.cs
ソース:
ControlPaint.cs

指定したグラフィックスサーフェイスとコントロールの指定した境界内に、3 次元スタイルの境界線を描画します。

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 メソッドの 1 つを使用する方法を示しています。 この例を実行するには、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 スタイルを使用して境界線を描画します。

こちらもご覧ください

適用対象