Sdílet prostřednictvím


SystemPens.InactiveBorder Vlastnost

Definice

Pen Získá barvu ohraničení neaktivního 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

Hodnota vlastnosti

Pen

Jedná Pen se o barvu ohraničení neaktivního okna.

Příklady

Následující příklad kódu ukazuje, jak použít InactiveBorder vlastnost. Pokud chcete tento příklad spustit, vložte ho do formuláře Windows. Zpracujte událost formuláře Paint a volejte metodu DrawWithInactiveBorderPenPaint z metody zpracování událostí a předejte e ji 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

Platí pro