VisualStyleElement.Window.SmallMaxCaption クラス

定義

最大表示された小さいウィンドウのタイトル バーの各状態用に VisualStyleElement オブジェクトを提供します。 このクラスは継承できません。

public: ref class VisualStyleElement::Window::SmallMaxCaption abstract sealed
public static class VisualStyleElement.Window.SmallMaxCaption
type VisualStyleElement.Window.SmallMaxCaption = class
Public Class VisualStyleElement.Window.SmallMaxCaption
継承
VisualStyleElement.Window.SmallMaxCaption

次のコード例では、 プロパティによって返される を使用して をVisualStyleRendererVisualStyleElement作成する方法をActive示します。 この例を実行するには、Windows フォームに貼り付けます。 フォームPaintのイベントを処理し、イベント処理メソッドから メソッドをDrawVisualStyleElementWindowSmallMaxCaption1Paint呼び出し、 を としてPaintEventArgs渡しますe

public void DrawVisualStyleElementWindowSmallMaxCaption1(PaintEventArgs e)
{
    if (VisualStyleRenderer.IsElementDefined(
        VisualStyleElement.Window.SmallMaxCaption.Active))
    {
        VisualStyleRenderer renderer =
             new VisualStyleRenderer(VisualStyleElement.Window.SmallMaxCaption.Active);
        Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
        renderer.DrawBackground(e.Graphics, rectangle1);
        e.Graphics.DrawString("VisualStyleElement.Window.SmallMaxCaption.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 DrawVisualStyleElementWindowSmallMaxCaption1(ByVal e As PaintEventArgs)
    If (VisualStyleRenderer.IsElementDefined( _
     VisualStyleElement.Window.SmallMaxCaption.Active)) Then
        Dim renderer As New VisualStyleRenderer _
          (VisualStyleElement.Window.SmallMaxCaption.Active)
        Dim rectangle1 As New Rectangle(10, 50, 50, 50)
        renderer.DrawBackground(e.Graphics, rectangle1)
        e.Graphics.DrawString("VisualStyleElement.Window.SmallMaxCaption.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

注釈

クラスの VisualStyleElement.Window.SmallMaxCaption 各プロパティは、ツール ウィンドウなど、最大化された小さなウィンドウのタイトル バーの異なる状態に対して を返 VisualStyleElement します。

プロパティ

Active

最大表示されたアクティブな小さいウィンドウのタイトル バーを表す visual スタイル要素を取得します。

Disabled

最大表示された無効の小さいウィンドウのタイトル バーを表す visual スタイル要素を取得します。

Inactive

最大表示されたアクティブでない小さいウィンドウのタイトル バーを表す visual スタイル要素を取得します。

適用対象

こちらもご覧ください