VisualStyleElement.Window.FrameRight.Active プロパティ
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
アクティブなウィンドウの右罫線を表す visual スタイル要素を取得します。
public:
static property System::Windows::Forms::VisualStyles::VisualStyleElement ^ Active { System::Windows::Forms::VisualStyles::VisualStyleElement ^ get(); };
public static System.Windows.Forms.VisualStyles.VisualStyleElement Active { get; }
static member Active : System.Windows.Forms.VisualStyles.VisualStyleElement
Public Shared ReadOnly Property Active As VisualStyleElement
プロパティ値
作業中のウィンドウの右罫線を表す VisualStyleElement 。
例
次のコード例では、Active プロパティによって返されるVisualStyleElementを使用してVisualStyleRendererを作成する方法を示します。 この例を実行するには、Windows フォームに貼り付けます。 フォームのPaint イベントを処理し、DrawVisualStyleElementWindowFrameRight1 イベント処理メソッドからPaint メソッドを呼び出し、eをPaintEventArgsとして渡します。
public void DrawVisualStyleElementWindowFrameRight1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.FrameRight.Active))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.FrameRight.Active);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.FrameRight.Active",
this.Font, Brushes.Black, new Point(10, 10));
}
else
e.Graphics.DrawString("This element is not defined in the current visual style.",
this.Font, Brushes.Black, new Point(10, 10));
}
Public Sub DrawVisualStyleElementWindowFrameRight1(ByVal e As PaintEventArgs)
If (VisualStyleRenderer.IsElementDefined( _
VisualStyleElement.Window.FrameRight.Active)) Then
Dim renderer As New VisualStyleRenderer _
(VisualStyleElement.Window.FrameRight.Active)
Dim rectangle1 As New Rectangle(10, 50, 50, 50)
renderer.DrawBackground(e.Graphics, rectangle1)
e.Graphics.DrawString("VisualStyleElement.Window.FrameRight.Active", _
Me.Font, Brushes.Black, New Point(10, 10))
Else
e.Graphics.DrawString("This element is not defined in the current visual style.", _
Me.Font, Brushes.Black, New Point(10, 10))
End If
End Sub
注釈
Active プロパティによって返されるVisualStyleElementを使用して、VisualStyleRendererを作成できます。