ControlPaint.DrawBorder メソッドとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > ControlPaint.DrawBorder メソッドの意味・解説 

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
)

パラメータ

graphics

描画する Graphics

bounds

輪郭大きさを表す Rectangle

leftColor

左の輪郭Color

leftWidth

左の輪郭の幅。

leftStyle

左端境界線スタイル指定する ButtonBorderStyle 値の 1 つ

topColor

上の輪郭Color

topWidth

上の輪郭の幅。

topStyle

上端境界線スタイル指定する ButtonBorderStyle 値の 1 つ

rightColor

右の輪郭Color

rightWidth

右の輪郭の幅。

rightStyle

右端境界線スタイル指定する ButtonBorderStyle 値の 1 つ

bottomColor

下の輪郭Color

bottomWidth

下側境界線の幅。

bottomStyle

下端境界線スタイル指定する ButtonBorderStyle 値の 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 名前空間
ButtonBorderStyle 列挙

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
)
public static function DrawBorder
 (
    graphics : Graphics, 
    bounds : Rectangle, 
    color : Color, 
    style : ButtonBorderStyle
)

パラメータ

graphics

描画する Graphics

bounds

輪郭大きさを表す Rectangle

color

輪郭Color

style

境界線スタイル指定する ButtonBorderStyle 値の 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.DrawBorder メソッド

ボタン スタイルコントロール輪郭描画ます。
オーバーロードの一覧オーバーロードの一覧

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

関連項目

ControlPaint クラス
ControlPaint メンバ
System.Windows.Forms 名前空間



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「ControlPaint.DrawBorder メソッド」の関連用語

ControlPaint.DrawBorder メソッドのお隣キーワード
検索ランキング

   

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



ControlPaint.DrawBorder メソッドのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2024 GRAS Group, Inc.RSS