CaptionButton 열거형

정의

표시할 캡션 단추의 종류를 지정합니다.

public enum class CaptionButton
public enum CaptionButton
type CaptionButton = 
Public Enum CaptionButton
상속
CaptionButton

필드

Close 0

닫기 단추.

Help 4

도움말 단추입니다.

Maximize 2

최대화 단추입니다.

Minimize 1

최소화 단추입니다.

Restore 3

이전 크기로 단추입니다.

예제

다음 코드 예제에서는 합니다 ControlPaint.DrawCaptionButton 메서드 및 CaptionButton 열거형입니다. 이 예제에 단추가 포함 된 폼에 다음 코드를 Button1 이라는 합니다. 폼은 System.Windows.Forms 및 System.Drawing 네임 스페이스를 가져와야 합니다. 이 예제에서 이벤트 처리 메서드에 연결 된 단추의 그리기 이벤트를 확인 합니다.

// 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

설명

이 열거형을 사용 하 여 ControlPaint.DrawCaptionButton입니다.

캡션 단추는 일반적으로 폼의 제목 표시줄의 오른쪽에 시스템 단추입니다.

적용 대상

추가 정보