CaptionButton Enumeráció
Definíció
Fontos
Egyes információk olyan, kiadás előtti termékekre vonatkoznak, amelyek a kiadásig még jelentősen módosulhatnak. A Microsoft nem vállal kifejezett vagy törvényi garanciát az itt megjelenő információért.
Megadja a megjelenítendő felirat gomb típusát.
public enum class CaptionButton
public enum CaptionButton
type CaptionButton =
Public Enum CaptionButton
- Öröklődés
Mezők
| Név | Érték | Description |
|---|---|---|
| Close | 0 | Bezárás gomb. |
| Minimize | 1 | Kis méret gomb. |
| Maximize | 2 | A Teljes méret gomb. |
| Restore | 3 | Visszaállítás gomb. |
| Help | 4 | Súgó gomb. |
Példák
Az alábbi példakód a metódus és az ControlPaint.DrawCaptionButtonCaptionButton enumerálás használatát mutatja be. A példa futtatásához illessze be a következő kódot egy button1 nevű gombot tartalmazó űrlapba. Az űrlapnak importálnia kell a rendszert. Windows. Forms és System.Drawing névterek. Győződjön meg arról, hogy a gomb Paint-eseménye az eseménykezelési metódushoz van társítva ebben a példában.
// 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
Megjegyzések
Ezt az enumerálást ControlPaint.DrawCaptionButtona következő használja: .
A feliratgombok általában az űrlap címsorának jobb szélső oldalán található rendszergombok.