CaptionButton 列挙体とは? わかりやすく解説

CaptionButton 列挙体

表示するキャプション ボタンの種類を指定します。

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

Dim instance As CaptionButton
public enum CaptionButton
public enum class CaptionButton
public enum CaptionButton
public enum CaptionButton
メンバメンバ
解説解説
使用例使用例

ControlPaint.DrawCaptionButton メソッドと CaptionButton 列挙体の使用方法を次のコード例に示します。この例を実行するには、次のコードを、Button1 という名前のボタンが配置されているフォームに貼り付けます。なお、対象のフォームは 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
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



英和和英テキスト翻訳

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

辞書ショートカット

すべての辞書の索引

「CaptionButton 列挙体」の関連用語

CaptionButton 列挙体のお隣キーワード

   

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



CaptionButton 列挙体のページの著作権

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

©2026 GRAS Group, Inc.RSS