Bagikan melalui


VisualStyleElement.Window.SmallFrameRight Kelas

Definisi

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

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

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 DrawVisualStyleElementWindowSmallFrameRight1 metode dari Paint metode penanganan peristiwa, meneruskan e sebagai 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

Keterangan

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

Properti

Active

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

Inactive

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

Berlaku untuk

Lihat juga