Share via


SystemPens.InactiveCaptionText Vlastnost

Definice

Pen Získá barvu textu v záhlaví neaktivního okna.

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

Hodnota vlastnosti

Pen

A Pen , která je barvou textu v záhlaví neaktivního okna.

Příklady

Následující příklad kódu ukazuje, jak použít InactiveCaptionText vlastnost . Pokud chcete spustit tento příklad, vložte ho do formuláře Windows Form. Zpracujte Paint událost formuláře a zavolejte metodu DrawWithInactiveCaptionTextPenPaint z metody zpracování událostí a předejte e ji jako PaintEventArgs.

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

End Sub

Platí pro