Udostępnij przez


SystemPens.InfoText Właściwość

Definicja

Pen Pobiera kolor tekstu etykietki narzędzia.

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

Wartość właściwości

Pen

Kolor Pen tekstu etykietki narzędzia.

Przykłady

W poniższym przykładzie kodu pokazano, jak używać InfoText właściwości. Aby uruchomić ten przykład, wklej go do formularza systemu Windows. Obsłuż zdarzenie formularza Paint i wywołaj DrawWithInfoTextPen metodę z Paint metody obsługi zdarzeń, przekazując e jako PaintEventArgs.

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

End Sub

Dotyczy