SystemPens.WindowText Proprietà

Definizione

Ottiene un oggetto Pen che corrisponde al colore del testo dell'area client di una finestra.

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

Valore della proprietà

Pen

Oggetto Pen che corrisponde al colore del testo dell'area client di una finestra.

Esempio

Nell'esempio di codice seguente viene illustrato come usare la WindowText proprietà. Per eseguire questo esempio, incollarlo in un Windows Form. Gestire l'evento del modulo e chiamare il DrawWithWindowText metodo dal Paint metodo di gestione degli Paint eventi, passando e come PaintEventArgs.

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

Si applica a