コントロールの 3D スタイルの輪郭を、指定したスタイルを使用して、指定したグラフィックスの表面と側面の指定した範囲内に描画します。
Overloads Public Shared Sub DrawBorder3D( _
ByVal graphics As Graphics, _ ByVal rectangle As Rectangle, _ ByVal style As Border3DStyle, _ ByVal sides As Border3DSide _)
[C#]
public static void DrawBorder3D(Graphicsgraphics,Rectanglerectangle,Border3DStylestyle,Border3DSidesides);
[C++]
public: static void DrawBorder3D(Graphics* graphics,Rectanglerectangle,Border3DStylestyle,Border3DSidesides);
[JScript]
public static function DrawBorder3D(
graphics : Graphics,rectangle : Rectangle,style : Border3DStyle,sides : Border3DSide);
パラメータ
- graphics
描画する Graphics 。 - rectangle
輪郭の大きさを表す Rectangle 。 - style
境界線のスタイルを指定する Border3DStyle 値の 1 つ。 - sides
輪郭を描画する四角形の辺を指定する Border3DSide 値の 1 つ。
使用例
[Visual Basic, C#] System.Windows.Forms.DrawBorder3D メソッドの中の 1 つを使用する方法を次のコード例に示します。この例を実行するには、次のコードをフォームに貼り付けます。このフォームは、 System.Windows.Forms 名前空間および System.Drawing 名前空間をインポートします。
' 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
[C#]
// 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);
}
[C++, JScript] C++ および JScript のサンプルはありません。Visual Basic および C# のサンプルを表示するには、このページの左上隅にある言語のフィルタ ボタン をクリックします。
必要条件
プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ
参照
ControlPaint クラス | ControlPaint メンバ | System.Windows.Forms 名前空間 | ControlPaint.DrawBorder3D オーバーロードの一覧 | Rectangle | Border3DStyle | Border3DSide