Bagikan melalui


VisualStyleElement.Window.SmallMinCaption Kelas

Definisi

Menyediakan VisualStyleElement objek untuk setiap status bilah judul dari jendela kecil yang diminimalkan. Kelas ini tidak dapat diwariskan.

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

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

public void DrawVisualStyleElementWindowSmallMinCaption1(PaintEventArgs e)
{
    if (VisualStyleRenderer.IsElementDefined(
        VisualStyleElement.Window.SmallMinCaption.Active))
    {
        VisualStyleRenderer renderer =
             new VisualStyleRenderer(VisualStyleElement.Window.SmallMinCaption.Active);
        Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
        renderer.DrawBackground(e.Graphics, rectangle1);
        e.Graphics.DrawString("VisualStyleElement.Window.SmallMinCaption.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 DrawVisualStyleElementWindowSmallMinCaption1(ByVal e As PaintEventArgs)
    If (VisualStyleRenderer.IsElementDefined( _
     VisualStyleElement.Window.SmallMinCaption.Active)) Then
        Dim renderer As New VisualStyleRenderer _
          (VisualStyleElement.Window.SmallMinCaption.Active)
        Dim rectangle1 As New Rectangle(10, 50, 50, 50)
        renderer.DrawBackground(e.Graphics, rectangle1)
        e.Graphics.DrawString("VisualStyleElement.Window.SmallMinCaption.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.SmallMinCaption kelas mengembalikan VisualStyleElement untuk status bilah judul yang berbeda dari jendela kecil yang diminimalkan, seperti jendela alat.

Properti

Active

Mendapatkan elemen gaya visual yang mewakili bilah judul jendela kecil aktif yang diminimalkan.

Disabled

Mendapatkan elemen gaya visual yang mewakili bilah judul jendela kecil yang dinonaktifkan yang diminimalkan.

Inactive

Mendapatkan elemen gaya visual yang mewakili bilah judul jendela kecil tidak aktif yang diminimalkan.

Berlaku untuk

Lihat juga