SystemPens.ActiveCaption プロパティ

定義

アクティブなウィンドウのタイトル バーの背景の色を表す Pen を取得します。

public:
 static property System::Drawing::Pen ^ ActiveCaption { System::Drawing::Pen ^ get(); };
public static System.Drawing.Pen ActiveCaption { get; }
static member ActiveCaption : System.Drawing.Pen
Public Shared ReadOnly Property ActiveCaption As Pen

プロパティ値

Pen

アクティブなウィンドウのタイトル バーの背景の色を表す Pen

次のコード例では、 プロパティの使用方法 ActiveCaption を示します。 この例を実行するには、Windows フォームに貼り付けます。 フォームPaintのイベントを処理し、イベント処理メソッドから メソッドをDrawWithActiveCaptionPenPaint呼び出し、 を としてPaintEventArgs渡しますe

private void DrawWithActiveCaptionPen(PaintEventArgs e)
{
    Rectangle rectangle1 = new Rectangle(10, 10, 100, 100);
    e.Graphics.DrawRectangle(SystemPens.ActiveCaption, rectangle1);
}
Private Sub DrawWithActiveCaptionPen(ByVal e As PaintEventArgs) 
    Dim rectangle1 As New Rectangle(10, 10, 100, 100)
    e.Graphics.DrawRectangle(SystemPens.ActiveCaption, rectangle1)

End Sub

適用対象