コントロールの 3D スタイルの輪郭を、指定したグラフィックスの表面の指定した範囲内に描画します。
Overloads Public Shared Sub DrawBorder3D( _
ByVal graphics As Graphics, _ ByVal rectangle As Rectangle _)
[C#]
public static void DrawBorder3D(Graphicsgraphics,Rectanglerectangle);
[C++]
public: static void DrawBorder3D(Graphics* graphics,Rectanglerectangle);
[JScript]
public static function DrawBorder3D(
graphics : Graphics,rectangle : Rectangle);
パラメータ
解説
既定では、 Border3DStyle.Etched スタイルを使用して輪郭を描画します。
使用例
[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