VisualStyleElement.Window.SmallFrameRight Classe

Definição

Fornece objetos VisualStyleElement para cada estado da borda direita de uma janela pequena. Essa classe não pode ser herdada.

public: ref class VisualStyleElement::Window::SmallFrameRight abstract sealed
public static class VisualStyleElement.Window.SmallFrameRight
type VisualStyleElement.Window.SmallFrameRight = class
Public Class VisualStyleElement.Window.SmallFrameRight
Herança
VisualStyleElement.Window.SmallFrameRight

Exemplos

O exemplo de código a Active seguir demonstra como criar um VisualStyleRenderer com o VisualStyleElement retornado pela propriedade . Para executar este exemplo, cole-o em um Windows Form. Manipule o evento do Paint formulário e chame o DrawVisualStyleElementWindowSmallFrameRight1 método do Paint método de manipulação de eventos, passando e como PaintEventArgs.

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

Comentários

Cada propriedade da VisualStyleElement.Window.SmallFrameRight classe retorna um VisualStyleElement para um estado diferente da borda direita de uma janela pequena, como uma janela de ferramentas.

Propriedades

Active

Obtém um elemento de estilo visual que representa a borda direita de uma janela pequena ativa.

Inactive

Obtém um elemento de estilo visual que representa a borda direita de uma janela pequena inativa.

Aplica-se a

Confira também