Udostępnij przez


SystemPens.InactiveBorder Właściwość

Definicja

Pobiera element Pen to kolor obramowania nieaktywnego okna.

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

Wartość właściwości

Pen

Jest Pen to kolor obramowania nieaktywnego okna.

Przykłady

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

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

End Sub

Dotyczy