Bagikan melalui


VisualStyleElement.Window.SmallFrameLeft Kelas

Definisi

Menyediakan VisualStyleElement objek untuk setiap status batas kiri jendela kecil. Kelas ini tidak dapat diwariskan.

public: ref class VisualStyleElement::Window::SmallFrameLeft abstract sealed
public static class VisualStyleElement.Window.SmallFrameLeft
type VisualStyleElement.Window.SmallFrameLeft = class
Public Class VisualStyleElement.Window.SmallFrameLeft
Warisan
VisualStyleElement.Window.SmallFrameLeft

Contoh

Contoh kode berikut menunjukkan cara membuat VisualStyleRenderer dengan yang VisualStyleElement dikembalikan oleh Active properti . Untuk menjalankan contoh ini, tempelkan ke dalam Formulir Windows. Tangani peristiwa formulir Paint dan panggil DrawVisualStyleElementWindowSmallFrameLeft1 metode dari Paint metode penanganan peristiwa, meneruskan e sebagai PaintEventArgs.

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

Keterangan

Setiap properti VisualStyleElement.Window.SmallFrameLeft kelas mengembalikan VisualStyleElement untuk status yang berbeda dari batas kiri jendela kecil, seperti jendela alat.

Properti

Active

Mendapatkan elemen gaya visual yang mewakili batas kiri jendela kecil aktif.

Inactive

Mendapatkan elemen gaya visual yang mewakili batas kiri jendela kecil yang tidak aktif.

Berlaku untuk

Lihat juga