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

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

ControlPaint.DrawCaptionButton メソッド (Graphics, Rectangle, CaptionButton, ButtonState)

指定したキャプション ボタン コントロールを、指定した状態で、指定したグラフィックス表面指定した範囲内描画ます。

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

Public Shared Sub DrawCaptionButton
 ( _
    graphics As Graphics, _
    rectangle As Rectangle, _
    button As CaptionButton, _
    state As ButtonState _
)
Dim graphics As Graphics
Dim rectangle As Rectangle
Dim button As CaptionButton
Dim state As ButtonState

ControlPaint.DrawCaptionButton(graphics, rectangle, button, state)
public static void DrawCaptionButton
 (
    Graphics graphics,
    Rectangle rectangle,
    CaptionButton button,
    ButtonState state
)
public:
static void DrawCaptionButton (
    Graphics^ graphics, 
    Rectangle rectangle, 
    CaptionButton button, 
    ButtonState state
)
public static void DrawCaptionButton
 (
    Graphics graphics, 
    Rectangle rectangle, 
    CaptionButton button, 
    ButtonState state
)
public static function DrawCaptionButton
 (
    graphics : Graphics, 
    rectangle : Rectangle, 
    button : CaptionButton, 
    state : ButtonState
)

パラメータ

graphics

描画する Graphics

rectangle

キャプション ボタン大きさを表す Rectangle

button

描画するキャプション ボタン種類指定する CaptionButton 値の 1 つ

state

描画するボタンの状態を指定する ButtonState 値のビットごとの組み合わせ

使用例使用例

ControlPaint.DrawCaptionButton メソッドCaptionButton 列挙体の使用方法を示すコード例次に示します。この例を実行するには、Button1 という名前の Button配置されているフォームに、次のコード貼り付けます。このフォームは、System.Windows.Forms 名前空間System.Drawing 名前空間インポートます。ボタンPaint イベントを、この例のイベント ハンドラに必ず関連付けるようにしてください

' Handle the Button1 object's Paint Event to create a CaptionButton.
Private Sub Button1_Paint(ByVal
 sender As Object, _
    ByVal e As PaintEventArgs) Handles
 Button1.Paint

    ' Draw a CaptionButton control using the ClientRectangle 
    ' property of Button1. Make the button a Help button 
    ' with a normal state.
    ControlPaint.DrawCaptionButton(e.Graphics, Button1.ClientRectangle, _
        CaptionButton.Help, ButtonState.Normal)
End Sub
// Handle the Button1 object's Paint Event to create a CaptionButton.
private void Button1_Paint(object sender, PaintEventArgs
 e)
{

    // Draw a CaptionButton control using the ClientRectangle 
    // property of Button1. Make the button a Help button 
    // with a normal state.
    ControlPaint.DrawCaptionButton(e.Graphics, Button1.ClientRectangle,
        CaptionButton.Help, ButtonState.Normal);
}
// Handle the Button1 object's Paint Event to create a CaptionButton.
void Button1_Paint( Object^ /*sender*/, PaintEventArgs^ e )
{
   
   // Draw a CaptionButton control using the ClientRectangle 
   // property of Button1. Make the button a Help button 
   // with a normal state.
   ControlPaint::DrawCaptionButton( e->Graphics, Button1->ClientRectangle,
 CaptionButton::Help, ButtonState::Normal );
}
// Handle the button1 object's Paint Event to create a CaptionButton.
private void button1_Paint(Object sender, PaintEventArgs
 e)
{
    // Draw a CaptionButton control using the ClientRectangle 
    // property of button1. Make the button a Help button 
    // with a normal state.
    ControlPaint.DrawCaptionButton(e.get_Graphics(), 
        button1.get_ClientRectangle(), CaptionButton.Help, 
        ButtonState.Normal);
} //button1_Paint
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

ControlPaint.DrawCaptionButton メソッド


ControlPaint.DrawCaptionButton メソッド (Graphics, Int32, Int32, Int32, Int32, CaptionButton, ButtonState)

指定したキャプション ボタン コントロールを、指定した状態で、指定したグラフィックス表面指定した範囲内描画ます。

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

Public Shared Sub DrawCaptionButton
 ( _
    graphics As Graphics, _
    x As Integer, _
    y As Integer, _
    width As Integer, _
    height As Integer, _
    button As CaptionButton, _
    state As ButtonState _
)
Dim graphics As Graphics
Dim x As Integer
Dim y As Integer
Dim width As Integer
Dim height As Integer
Dim button As CaptionButton
Dim state As ButtonState

ControlPaint.DrawCaptionButton(graphics, x, y, width, height, button, state)
public static void DrawCaptionButton
 (
    Graphics graphics,
    int x,
    int y,
    int width,
    int height,
    CaptionButton button,
    ButtonState state
)
public:
static void DrawCaptionButton (
    Graphics^ graphics, 
    int x, 
    int y, 
    int width, 
    int height, 
    CaptionButton button, 
    ButtonState state
)
public static void DrawCaptionButton
 (
    Graphics graphics, 
    int x, 
    int y, 
    int width, 
    int height, 
    CaptionButton button, 
    ButtonState state
)
public static function DrawCaptionButton
 (
    graphics : Graphics, 
    x : int, 
    y : int, 
    width : int, 
    height : int, 
    button : CaptionButton, 
    state : ButtonState
)

パラメータ

graphics

描画する Graphics

x

描画する四角形左上x 座標

y

描画する四角形左上y 座標

width

描画する四角形の幅。

height

描画する四角形の高さ。

button

描画するキャプション ボタン種類指定する CaptionButton 値の 1 つ

state

描画するボタンの状態を指定する ButtonState 値のビットごとの組み合わせ

使用例使用例

DrawCaptionButton メソッドCaptionButton 列挙体の使用方法を示すコード例次に示します。この例を実行するには、Button1 という名前の Button配置されているフォームに、次のコード貼り付けます。このフォームは、System.Windows.Forms 名前空間System.Drawing 名前空間インポートます。ボタンPaint イベントを、この例のイベント ハンドラに必ず関連付けるようにしてください

' Handle the Button1 object's Paint Event to create a CaptionButton.
Private Sub Button1_Paint(ByVal
 sender As Object, _
    ByVal e As PaintEventArgs) Handles
 Button1.Paint

    ' Draw a CaptionButton control using the ClientRectangle 
    ' property of Button1. Make the button a Help button 
    ' with a normal state.
    ControlPaint.DrawCaptionButton(e.Graphics, Button1.ClientRectangle, _
        CaptionButton.Help, ButtonState.Normal)
End Sub
// Handle the Button1 object's Paint Event to create a CaptionButton.
private void Button1_Paint(object sender, PaintEventArgs
 e)
{

    // Draw a CaptionButton control using the ClientRectangle 
    // property of Button1. Make the button a Help button 
    // with a normal state.
    ControlPaint.DrawCaptionButton(e.Graphics, Button1.ClientRectangle,
        CaptionButton.Help, ButtonState.Normal);
}
// Handle the Button1 object's Paint Event to create a CaptionButton.
void Button1_Paint( Object^ /*sender*/, PaintEventArgs^ e )
{
   
   // Draw a CaptionButton control using the ClientRectangle 
   // property of Button1. Make the button a Help button 
   // with a normal state.
   ControlPaint::DrawCaptionButton( e->Graphics, Button1->ClientRectangle,
 CaptionButton::Help, ButtonState::Normal );
}
// Handle the button1 object's Paint Event to create a CaptionButton.
private void button1_Paint(Object sender, PaintEventArgs
 e)
{
    // Draw a CaptionButton control using the ClientRectangle 
    // property of button1. Make the button a Help button 
    // with a normal state.
    ControlPaint.DrawCaptionButton(e.get_Graphics(), 
        button1.get_ClientRectangle(), CaptionButton.Help, 
        ButtonState.Normal);
} //button1_Paint
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



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

辞書ショートカット

すべての辞書の索引

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

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

   

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



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

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

©2024 GRAS Group, Inc.RSS