ControlPaint.DrawBorder3Dとは? わかりやすく解説

ControlPaint.DrawBorder3D メソッド (Graphics, Rectangle, Border3DStyle, Border3DSide)

コントロールの 3D スタイルの輪郭を、指定したスタイルを使用して、指定したグラフィックスの表面と側面の指定した範囲内に描画します。

名前空間: System.Windows.Forms
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)
構文構文

Public Shared Sub DrawBorder3D
 ( _
    graphics As Graphics, _
    rectangle As Rectangle, _
    style As Border3DStyle, _
    sides As Border3DSide _
)
Dim graphics As Graphics
Dim rectangle As Rectangle
Dim style As Border3DStyle
Dim sides As Border3DSide

ControlPaint.DrawBorder3D(graphics, rectangle, style, sides)
public static void DrawBorder3D
 (
    Graphics graphics,
    Rectangle rectangle,
    Border3DStyle style,
    Border3DSide sides
)
public:
static void DrawBorder3D (
    Graphics^ graphics, 
    Rectangle rectangle, 
    Border3DStyle style, 
    Border3DSide sides
)
public static void DrawBorder3D
 (
    Graphics graphics, 
    Rectangle rectangle, 
    Border3DStyle style, 
    Border3DSide sides
)
public static function DrawBorder3D
 (
    graphics : Graphics, 
    rectangle : Rectangle, 
    style : Border3DStyle, 
    sides : Border3DSide
)

パラメータ

graphics

描画する Graphics。

rectangle

輪郭の大きさを表す Rectangle。

style

境界線のスタイルを指定する Border3DStyle 値の 1 つ。

sides

輪郭を描画する四角形の辺を指定する 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.
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
// 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.
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.get_ClientRectangle();
    borderRectangle.Inflate(-10, -10);
    ControlPaint.DrawBorder3D(e.get_Graphics(), borderRectangle, 
        Border3DStyle.Raised);
} //Form1_Paint
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
ControlPaint クラス
ControlPaint メンバ
System.Windows.Forms 名前空間
Rectangle
Border3DStyle 列挙体
Border3DSide 列挙体

ControlPaint.DrawBorder3D メソッド (Graphics, Int32, Int32, Int32, Int32, Border3DStyle, Border3DSide)

コントロールの 3D スタイルの輪郭を、指定したスタイルを使用して、指定したグラフィックスの表面と側面の指定した範囲内に描画します。

名前空間: System.Windows.Forms
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)
構文構文

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 _
)
Dim graphics As Graphics
Dim x As Integer
Dim y As Integer
Dim width As Integer
Dim height As Integer
Dim style As Border3DStyle
Dim sides As Border3DSide

ControlPaint.DrawBorder3D(graphics, x, y, width, height, style, sides)
public static void DrawBorder3D
 (
    Graphics graphics,
    int x,
    int y,
    int width,
    int height,
    Border3DStyle style,
    Border3DSide sides
)
public:
static void DrawBorder3D (
    Graphics^ graphics, 
    int x, 
    int y, 
    int width, 
    int height, 
    Border3DStyle style, 
    Border3DSide sides
)
public static void DrawBorder3D
 (
    Graphics graphics, 
    int x, 
    int y, 
    int width, 
    int height, 
    Border3DStyle style, 
    Border3DSide sides
)
public static function DrawBorder3D
 (
    graphics : Graphics, 
    x : int, 
    y : int, 
    width : int, 
    height : int, 
    style : Border3DStyle, 
    sides : Border3DSide
)

パラメータ

graphics

描画する Graphics。

x

輪郭の四角形の左上の x 座標。

y

輪郭の四角形の左上の y 座標。

width

輪郭の四角形の幅。

height

輪郭の四角形の高さ。

style

境界線のスタイルを指定する Border3DStyle 値の 1 つ。

sides

輪郭を描画する四角形の 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.
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
// 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.
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.get_ClientRectangle();
    borderRectangle.Inflate(-10, -10);
    ControlPaint.DrawBorder3D(e.get_Graphics(), borderRectangle, 
        Border3DStyle.Raised);
} //Form1_Paint
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
ControlPaint クラス
ControlPaint メンバ
System.Windows.Forms 名前空間
Border3DStyle 列挙体
Border3DSide 列挙体

ControlPaint.DrawBorder3D メソッド

コントロールの 3 次元スタイルの輪郭を描画します。
オーバーロードの一覧オーバーロードの一覧

参照参照

関連項目

ControlPaint クラス
ControlPaint メンバ
System.Windows.Forms 名前空間
Rectangle
Border3DStyle 列挙体

ControlPaint.DrawBorder3D メソッド (Graphics, Int32, Int32, Int32, Int32)

コントロールの 3D スタイルの輪郭を、指定したグラフィックスの表面の指定した範囲内に描画します。

名前空間: System.Windows.Forms
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)
構文構文

解説解説

既定では、Border3DStyle.Etched スタイルを使用して輪郭を描画します。

使用例使用例

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.
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
// 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.
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.get_ClientRectangle();
    borderRectangle.Inflate(-10, -10);
    ControlPaint.DrawBorder3D(e.get_Graphics(), borderRectangle, 
        Border3DStyle.Raised);
} //Form1_Paint
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

ControlPaint.DrawBorder3D メソッド (Graphics, Rectangle, Border3DStyle)

コントロールの 3D スタイルの輪郭を、指定したスタイルを使用して、指定した範囲内の指定したグラフィックスの表面に描画します。

名前空間: System.Windows.Forms
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)
構文構文

Public Shared Sub DrawBorder3D
 ( _
    graphics As Graphics, _
    rectangle As Rectangle, _
    style As Border3DStyle _
)
Dim graphics As Graphics
Dim rectangle As Rectangle
Dim style As Border3DStyle

ControlPaint.DrawBorder3D(graphics, rectangle, style)
public static void DrawBorder3D
 (
    Graphics graphics,
    Rectangle rectangle,
    Border3DStyle style
)
public:
static void DrawBorder3D (
    Graphics^ graphics, 
    Rectangle rectangle, 
    Border3DStyle style
)
public static void DrawBorder3D
 (
    Graphics graphics, 
    Rectangle rectangle, 
    Border3DStyle style
)
public static function DrawBorder3D
 (
    graphics : Graphics, 
    rectangle : Rectangle, 
    style : Border3DStyle
)

パラメータ

graphics

描画する Graphics。

rectangle

輪郭の大きさを表す Rectangle。

style

境界線のスタイルを指定する 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.
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
// 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.
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.get_ClientRectangle();
    borderRectangle.Inflate(-10, -10);
    ControlPaint.DrawBorder3D(e.get_Graphics(), borderRectangle, 
        Border3DStyle.Raised);
} //Form1_Paint
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

ControlPaint.DrawBorder3D メソッド (Graphics, Int32, Int32, Int32, Int32, Border3DStyle)

コントロールの 3D スタイルの輪郭を、指定したスタイルを使用して、指定した範囲内の指定したグラフィックスの表面に描画します。

名前空間: System.Windows.Forms
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)
構文構文

Public Shared Sub DrawBorder3D
 ( _
    graphics As Graphics, _
    x As Integer, _
    y As Integer, _
    width As Integer, _
    height As Integer, _
    style As Border3DStyle _
)
Dim graphics As Graphics
Dim x As Integer
Dim y As Integer
Dim width As Integer
Dim height As Integer
Dim style As Border3DStyle

ControlPaint.DrawBorder3D(graphics, x, y, width, height, style)
public static void DrawBorder3D
 (
    Graphics graphics,
    int x,
    int y,
    int width,
    int height,
    Border3DStyle style
)
public:
static void DrawBorder3D (
    Graphics^ graphics, 
    int x, 
    int y, 
    int width, 
    int height, 
    Border3DStyle style
)
public static void DrawBorder3D
 (
    Graphics graphics, 
    int x, 
    int y, 
    int width, 
    int height, 
    Border3DStyle style
)
public static function DrawBorder3D
 (
    graphics : Graphics, 
    x : int, 
    y : int, 
    width : int, 
    height : int, 
    style : Border3DStyle
)

パラメータ

graphics

描画する Graphics。

x

輪郭の四角形の左上の x 座標。

y

輪郭の四角形の左上の y 座標。

width

輪郭の四角形の幅。

height

輪郭の四角形の高さ。

style

境界線のスタイルを指定する 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.
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
// 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.
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.get_ClientRectangle();
    borderRectangle.Inflate(-10, -10);
    ControlPaint.DrawBorder3D(e.get_Graphics(), borderRectangle, 
        Border3DStyle.Raised);
} //Form1_Paint
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

ControlPaint.DrawBorder3D メソッド (Graphics, Rectangle)

コントロールの 3D スタイルの輪郭を、指定したグラフィックスの表面の指定した範囲内に描画します。

名前空間: System.Windows.Forms
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)
構文構文

解説解説

既定では、Border3DStyle.Etched スタイルを使用して輪郭を描画します。

使用例使用例

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.
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
// 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.
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.get_ClientRectangle();
    borderRectangle.Inflate(-10, -10);
    ControlPaint.DrawBorder3D(e.get_Graphics(), borderRectangle, 
        Border3DStyle.Raised);
} //Form1_Paint
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



英和和英テキスト翻訳

英語⇒日本語日本語⇒英語

辞書ショートカット

すべての辞書の索引

「ControlPaint.DrawBorder3D」の関連用語

ControlPaint.DrawBorder3Dのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



ControlPaint.DrawBorder3Dのページの著作権

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2026 Microsoft.All rights reserved.

©2026 GRAS Group, Inc.RSS