ControlPaint.DrawBorder メソッド (Graphics, Rectangle, Color, Int32, ButtonBorderStyle, Color, Int32, ButtonBorderStyle, Color, Int32, ButtonBorderStyle, Color, Int32, ButtonBorderStyle)
ボタン スタイルのコントロールの境界線を、指定したスタイル、色、および境界線の幅を使用して、指定したグラフィックスの表面上、および指定した境界内に描画します。
名前空間: System.Windows.Forms
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)
構文
Public Shared Sub DrawBorder ( _ graphics As Graphics, _ bounds As Rectangle, _ leftColor As Color, _ leftWidth As Integer, _ leftStyle As ButtonBorderStyle, _ topColor As Color, _ topWidth As Integer, _ topStyle As ButtonBorderStyle, _ rightColor As Color, _ rightWidth As Integer, _ rightStyle As ButtonBorderStyle, _ bottomColor As Color, _ bottomWidth As Integer, _ bottomStyle As ButtonBorderStyle _ )
Dim graphics As Graphics Dim bounds As Rectangle Dim leftColor As Color Dim leftWidth As Integer Dim leftStyle As ButtonBorderStyle Dim topColor As Color Dim topWidth As Integer Dim topStyle As ButtonBorderStyle Dim rightColor As Color Dim rightWidth As Integer Dim rightStyle As ButtonBorderStyle Dim bottomColor As Color Dim bottomWidth As Integer Dim bottomStyle As ButtonBorderStyle ControlPaint.DrawBorder(graphics, bounds, leftColor, leftWidth, leftStyle, topColor, topWidth, topStyle, rightColor, rightWidth, rightStyle, bottomColor, bottomWidth, bottomStyle)
public static void DrawBorder ( Graphics graphics, Rectangle bounds, Color leftColor, int leftWidth, ButtonBorderStyle leftStyle, Color topColor, int topWidth, ButtonBorderStyle topStyle, Color rightColor, int rightWidth, ButtonBorderStyle rightStyle, Color bottomColor, int bottomWidth, ButtonBorderStyle bottomStyle )
public: static void DrawBorder ( Graphics^ graphics, Rectangle bounds, Color leftColor, int leftWidth, ButtonBorderStyle leftStyle, Color topColor, int topWidth, ButtonBorderStyle topStyle, Color rightColor, int rightWidth, ButtonBorderStyle rightStyle, Color bottomColor, int bottomWidth, ButtonBorderStyle bottomStyle )
public static void DrawBorder ( Graphics graphics, Rectangle bounds, Color leftColor, int leftWidth, ButtonBorderStyle leftStyle, Color topColor, int topWidth, ButtonBorderStyle topStyle, Color rightColor, int rightWidth, ButtonBorderStyle rightStyle, Color bottomColor, int bottomWidth, ButtonBorderStyle bottomStyle )
public static function DrawBorder ( graphics : Graphics, bounds : Rectangle, leftColor : Color, leftWidth : int, leftStyle : ButtonBorderStyle, topColor : Color, topWidth : int, topStyle : ButtonBorderStyle, rightColor : Color, rightWidth : int, rightStyle : ButtonBorderStyle, bottomColor : Color, bottomWidth : int, bottomStyle : ButtonBorderStyle )
- leftWidth
左の輪郭の幅。
- rightWidth
右の輪郭の幅。

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

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


ControlPaint.DrawBorder メソッド (Graphics, Rectangle, Color, ButtonBorderStyle)
ボタン スタイル コントロールの輪郭を、指定したスタイルと色を使用して、指定した範囲内の指定したグラフィックスの表面に描画します。
名前空間: System.Windows.Forms
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)
構文
Public Shared Sub DrawBorder ( _ graphics As Graphics, _ bounds As Rectangle, _ color As Color, _ style As ButtonBorderStyle _ )
Dim graphics As Graphics Dim bounds As Rectangle Dim color As Color Dim style As ButtonBorderStyle ControlPaint.DrawBorder(graphics, bounds, color, style)
public static void DrawBorder ( Graphics graphics, Rectangle bounds, Color color, ButtonBorderStyle style )
public: static void DrawBorder ( Graphics^ graphics, Rectangle bounds, Color color, ButtonBorderStyle style )
public static void DrawBorder ( Graphics graphics, Rectangle bounds, Color color, ButtonBorderStyle style )

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

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


ControlPaint.DrawBorder メソッド
ボタン スタイルのコントロールの輪郭を描画します。
オーバーロードの一覧
名前 | 説明 |
---|---|
ControlPaint.DrawBorder (Graphics, Rectangle, Color, ButtonBorderStyle) | ボタン スタイル コントロールの輪郭を、指定したスタイルと色を使用して、指定した範囲内の指定したグラフィックスの表面に描画します。 |
ControlPaint.DrawBorder (Graphics, Rectangle, Color, Int32, ButtonBorderStyle, Color, Int32, ButtonBorderStyle, Color, Int32, ButtonBorderStyle, Color, Int32, ButtonBorderStyle) | ボタン スタイルのコントロールの境界線を、指定したスタイル、色、および境界線の幅を使用して、指定したグラフィックスの表面上、および指定した境界内に描画します。 |

Weblioに収録されているすべての辞書からControlPaint.DrawBorderを検索する場合は、下記のリンクをクリックしてください。

- ControlPaint.DrawBorderのページへのリンク