VisualStyleElement.Window.HelpButton Osztály

Definíció

Objektumokat biztosít VisualStyleElement egy ablak vagy párbeszédpanel Súgó gombjának minden állapotához. Ez az osztály nem örökölhető.

public: ref class VisualStyleElement::Window::HelpButton abstract sealed
public static class VisualStyleElement.Window.HelpButton
type VisualStyleElement.Window.HelpButton = class
Public Class VisualStyleElement.Window.HelpButton
Öröklődés
VisualStyleElement.Window.HelpButton

Példák

Az alábbi példakód bemutatja, hogyan hozhat létre egy VisualStyleRenderer tulajdonság által visszaadott VisualStyleElement kóddalNormal. A példa futtatásához illessze be egy Windows űrlapba. Kezelje az űrlap eseményét Paint , és hívja meg a DrawVisualStyleElementWindowHelpButton1 metódust az Paint eseménykezelési metódusból, és e adja át a következőt PaintEventArgs: .

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

Megjegyzések

Az osztály minden tulajdonsága VisualStyleElement.Window.HelpButton egy ablak vagy párbeszédpanel VisualStyleElement gombjának egy másik állapotát adja vissza.

Tulajdonságok

Name Description
Disabled

Lekéri a letiltott állapotban lévő súgógombot jelképező vizuális stíluselemet.

Hot

Beolvas egy vizuális stíluselemet, amely egy súgógombot jelöl a gyakori elérésű állapotban.

Normal

Lekéri a normál állapotban lévő súgógombot jelképező vizuális stíluselemet.

Pressed

Lekéri a lenyomott állapotban lévő súgógombot jelképező vizuális stíluselemet.

A következőre érvényes:

Lásd még