Share via


SystemPens.GradientActiveCaption 屬性

定義

取得 Pen,其為使用中視窗標題列之色彩漸層中最亮的色彩。

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

屬性值

Pen

Pen,為現用視窗標題列的色彩漸層中最亮的色彩。

範例

下列程式代碼範例示範如何使用 GradientActiveCaption 屬性。 若要執行此範例,請將它貼到 Windows Form 中。 處理表單的事件 Paint ,並從事件處理方法呼叫 DrawWithGradientActiveCaptionPen 方法 Paint ,並傳遞 ePaintEventArgs

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

End Sub

適用於