CaptionButton Énumération

Définition

Spécifie le type de bouton de barre de titre à afficher.

public enum class CaptionButton
public enum CaptionButton
type CaptionButton = 
Public Enum CaptionButton
Héritage
CaptionButton

Champs

Close 0

bouton Fermer ;

Help 4

Bouton Aide.

Maximize 2

Bouton Agrandir.

Minimize 1

Bouton Réduire.

Restore 3

Bouton Restaurer.

Exemples

L’exemple de code suivant illustre l’utilisation de la ControlPaint.DrawCaptionButton méthode et de l’énumération CaptionButton . Pour exécuter cet exemple, collez le code suivant dans un formulaire contenant un bouton nommé Button1. Le formulaire doit importer le système. Windows. Espaces de noms Forms et System.Drawing. Vérifiez que l’événement Paint du bouton est associé à la méthode de gestion des événements dans cet exemple.

// Handle the Button1 object's Paint Event to create a CaptionButton.
void Button1_Paint( Object^ /*sender*/, PaintEventArgs^ e )
{
   
   // Draw a CaptionButton control using the ClientRectangle 
   // property of Button1. Make the button a Help button 
   // with a normal state.
   ControlPaint::DrawCaptionButton( e->Graphics, Button1->ClientRectangle, CaptionButton::Help, ButtonState::Normal );
}
// Handle the Button1 object's Paint Event to create a CaptionButton.
private void Button1_Paint(object sender, PaintEventArgs e)
{

    // Draw a CaptionButton control using the ClientRectangle 
    // property of Button1. Make the button a Help button 
    // with a normal state.
    ControlPaint.DrawCaptionButton(e.Graphics, Button1.ClientRectangle,
        CaptionButton.Help, ButtonState.Normal);
}
' Handle the Button1 object's Paint Event to create a CaptionButton.
Private Sub Button1_Paint(ByVal sender As Object, _
    ByVal e As PaintEventArgs) Handles Button1.Paint

    ' Draw a CaptionButton control using the ClientRectangle 
    ' property of Button1. Make the button a Help button 
    ' with a normal state.
    ControlPaint.DrawCaptionButton(e.Graphics, Button1.ClientRectangle, _
        CaptionButton.Help, ButtonState.Normal)
End Sub

Remarques

Cette énumération est utilisée par ControlPaint.DrawCaptionButton.

Les boutons de légende sont les boutons système généralement trouvés sur le côté droit de la barre de titre d’un formulaire.

S’applique à

Voir aussi