Freigeben über


VisualStyleElement.Window.HorizontalScroll Klasse

Definition

Stellt VisualStyleElement Objekte für jeden Zustand der horizontalen Bildlaufleiste eines Fensters bereit. Diese Klasse kann nicht vererbt werden.

public: ref class VisualStyleElement::Window::HorizontalScroll abstract sealed
public static class VisualStyleElement.Window.HorizontalScroll
type VisualStyleElement.Window.HorizontalScroll = class
Public Class VisualStyleElement.Window.HorizontalScroll
Vererbung
VisualStyleElement.Window.HorizontalScroll

Beispiele

Im folgenden Codebeispiel wird veranschaulicht, wie sie eine VisualStyleRenderer mit der VisualStyleElement von der Normal Eigenschaft zurückgegebenen Eigenschaft erstellen. Zum Ausführen dieses Beispiels fügen Sie es in ein Windows Form-Formular ein. Behandeln Sie das Ereignis des Formulars Paint , und rufen Sie die DrawVisualStyleElementWindowHorizontalScroll1 Methode aus der Paint Ereignisbehandlungsmethode auf und übergeben als ePaintEventArgs.

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

Hinweise

Jede Eigenschaft der VisualStyleElement.Window.HorizontalScroll Klasse gibt einen VisualStyleElement anderen Zustand der horizontalen Bildlaufleiste eines Fensters zurück.

Eigenschaften

Name Beschreibung
Disabled

Ruft ein visuelles Stilelement ab, das eine horizontale Bildlaufleiste im deaktivierten Zustand darstellt.

Hot

Ruft ein visuelles Stilelement ab, das eine horizontale Bildlaufleiste im Heißzustand darstellt.

Normal

Ruft ein visuelles Formatelement ab, das eine horizontale Bildlaufleiste im normalen Zustand darstellt.

Pressed

Ruft ein visuelles Formatelement ab, das eine horizontale Bildlaufleiste im gedrückten Zustand darstellt.

Gilt für:

Weitere Informationen