ControlPaint.DrawCaptionButton メソッド (Graphics, Rectangle, CaptionButton, ButtonState)
アセンブリ: 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 )
 使用例
使用例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
 プラットフォーム
プラットフォーム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.DrawCaptionButton メソッド
 オーバーロードの一覧
オーバーロードの一覧| 名前 | 説明 | 
|---|---|
| ControlPaint.DrawCaptionButton (Graphics, Rectangle, CaptionButton, ButtonState) | 指定したキャプション ボタン コントロールを、指定した状態で、指定したグラフィックスの表面の指定した範囲内に描画します。 | 
| ControlPaint.DrawCaptionButton (Graphics, Int32, Int32, Int32, Int32, CaptionButton, ButtonState) | 指定したキャプション ボタン コントロールを、指定した状態で、指定したグラフィックスの表面の指定した範囲内に描画します。 | 
 参照
参照ControlPaint.DrawCaptionButton メソッド (Graphics, Int32, Int32, Int32, Int32, CaptionButton, ButtonState)
アセンブリ: 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 )
 使用例
使用例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
 プラットフォーム
プラットフォーム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.DrawCaptionButton メソッドのページへのリンク

 
                             
                    


